It's all about the answers!

Ask a question

Example for regular expression to restrict changes by Item Name


0
1
Katrin Heymann (19823858) | asked Nov 26 '14, 7:50 a.m.
We are using CLM 4.x and I'm searching for an example how to prevent file / folder names that have problems on Unix / Windows systems (blanks / "/" / ...).

I tried a lot of expressions but nothing works fine. Are there any example ?

Accepted answer


permanent link
Evan Hughes (2.4k1218) | answered Nov 26 '14, 10:53 a.m.
JAZZ DEVELOPER
edited Nov 26 '14, 11:15 a.m.
I suggest specifying a list of legal characters: ^[_0-9a-zA-Z\.]+$ in the 'Restrict Changes by Item Name' advisor. e.g:


With that predcondition enabled, I am able to deliver the creation of the file "TestFile.txt" but unable to deliver the creation of "!TestFile.txt".
Katrin Heymann selected this answer as the correct answer

Comments
Katrin Heymann commented Nov 26 '14, 10:57 a.m.

I tried but with the setting "allowed" I am not able to upload a file with the name "TestFile.txt" and with the setting "prevented" every name (including special signs) is allowed.
Do you have an example that works ?


Evan Hughes commented Nov 26 '14, 11:17 a.m.
JAZZ DEVELOPER

I've updated the answer to include a screenshot and mention that it properly allows the delivery of a file matching the regex and prevents the delivery of a file that doesn't match the regex. 

Your answer


Register or to post your answer.