Developer Documentation Library > UNICOM Intelligence Function Library > Text functions > RegExFind
 
RegExFind
Returns the first substring matched by the regular expression in the string Val. Returns an empty string if a match was not found for the regular expression.
Syntax
RegexFind (<value>, <expression> [, <start> [, <end> [, <ignore_case>]]])
Parameters
<value>
Type: Text
The text to be validated.
<expression>
Type: Text
The regular expression.
<start>
Type: Long
(Optional.) The position to start the search in Val. The default value is 0, which means the search starts at the first Val character.
<end>
Type: Long
(Optional.) The position to end the search. The default value is 0, which means that whole string is searched.
<ignore_case>
Type: Boolean
(Optional.) The default value is False.
Notes
ICU string types are not supported. For more information, see “Working With Unicode and ICU String Types”:
http://boost.sourceforge.net/libs/regex/doc/icu_strings.html
Example
The following example searches the email address from the LogEntry:
LogEntry.RegexFind ("^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$")
See also
Text functions