Peter_Fekete_8604

Promptsets regular expressions on multi-line text fields

Discussion created by Peter_Fekete_8604 on Apr 28, 2017

One customer request was about the usage of regular expressions on multi-line text fields in prompt.

There are few examples of regular expressions (only for text in PRMPT) in the Automic documentation, but no reference on how to apply them to multiline text fields.

https://community.automic.com/post/discussion/https//docs.automic.com/documentation/webhelp/english/ALL/components/AE/11.2/All%20Guides/help.htm#ucacti.htm%3FTocPath%3DBenutzerhandbuch%7CObjekte%7CAlphabetische%2520Auflistung%7CPromptSet%7C_____3 

Here are couple of Examples: 

Only allow two-digit numbers: [0-9]{2} 
Allow all characters except for "x": [^x]
 
One of the characters "a", "b" or "c": [abc]
 
All uppercase and lowercase letters, numbers and the comma character can be used as often as required: [A-Za-z0-9,]*
 
Allowed characters: #, , ,$, @, A-Z, 0-9. Maximum length 10:  [A-Z0-9_#@$,]{0,10}

For a line break please use \n within the regex


l2quaz9n1w5y.png

UC4#A

UC4#B

Regex: UC4#[A-Z]\nUC4#[A-Z]

 

For more information about regular expressions click here.

Outcomes