BE_RegularExpression ( text ; expression {; options ; replaceString } )
A perl compatible regular expression testing function.
Version 3.2 : Added.
Parameters :
text : the text to be examined.
expression: a "perl compatible" expression - see examples.
options:
- i - case insensitive
- m - multiline
- s - dot matches all characters, including newline
- x - ignore whitespace
- g - replace all
replaceString: if not empty, then a replace is performed rather than a find.
Examples :
BE_RegularExpression ( "abc 123 def" ; "[0-9]+" ) = 123
BE_RegularExpression ( $list; "(?:\\S(?![ ]))+$"; "igm" )
More examples can be found here : http://perldoc.perl.org/perlre.html#Regular-Expressions
0 Comments