Starting from the 2013 R2 the regular expression is supported on entry-field control. The power of regular expression is now available also during entry-field accept. The following example shows how to declare regular expression on a screen section entry-field:
Due to the above code, if the entry-field content doesn't match with the regexp specified by validation-regexp, then the message specified by validation-errmsg is automatically shown by the runtime and the focus is kept on the field. validation-opts=1 means that the check is done case insensitive
03 e1 entry-field line 2 col 2 size 50 value var
validation-errmsg "Invalid email address"
Matches firstname.lastname@example.org | email@example.com | firstname.lastname@example.org
Non-Matches -email@example.com | .firstname.lastname@example.org | smith@foo_com
The regexp syntax must respect Java specifications
Regular Expression are collected and discussed on the web. For example, on this web site http://regexlib.com/ you can find ready-to-use expression for common issues as well as an online regexp validator tool.