Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

regular expression to restrict changes by Item Name

I have a problem with a regular expression to not allow special characters in file names.

I used the following expression ^[_0-9a-zA-Z\.]+$ which allows alphabetical characters, numbers, '_' and '.'.  I don't allow '-' in files names.
 
The result is that It doens't allow the creation  of a file named xx&yy or xx-yy.
It also doesn't allow to rename a file xx&yy but renaming a file xx-yy works.

And I don't understand why :-( the character '-' is accepted when it is a rename operation.

Thanks for your help.

Samira

0 votes



One answer

Permanent link
Hi,
where do you put this regex? In an advisor? Of which operatation?

Michele.

0 votes

Comments

in a precondition of a deliver



 with the following parameters of the expression




Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,117

Question asked: Oct 24 '12, 6:07 a.m.

Question was seen: 4,803 times

Last updated: Oct 24 '12, 8:15 a.m.

Confirmation Cancel Confirm