The Regex package provides regex search functionality. The major functionalities offered in the Regex Package are the following:
Regex r
r.SetPattern ( '([[:alnum:]]+)(\.|_)?([[:alnum:]]*)@([[:alnum:]]+)(\.([[:alnum:]]+))+' )
echo ( r.Match ( 'marius.bancila@domain.com' ) )
echo ( r.Match ( 'marius@domain' ) )
Boolean Match( String value)
Evaluates value against the regular expression specified in the SetPattern() function
value | - | String to be evaluated |
void SetPattern( String pattern)
Sets the pattern to be used for matches for this regex instance. Note: this regex only supports POSIX character classes.
pattern | - | String containing the regex pattern |