xHarbour Reference Documentation > Function Reference |
Compiles a regular expression into a binary search pattern.
HB_RegExComp( <cRegEx> , ; [<lCaseSensitive>], ; [<lNewLine>] ) --> cBinaryRegEx
The function returns a character string holding <cRegEx> as a compiled binary regular expression. If <cRegEx> is not a valid regular expression, a runtime error is generated.
All regular expression functions and operators can process character strings containing literal regular expressions or compiled regular expressions. A literal regular expression is compiled with HB_RegExComp() to speed up pattern matching. This is advantageous when the same regular expression is used very often in a search routine.
Note: function HB_IsRegExString() can be used to test if a variable holds a compiled regular expression.
See also: | HAS, HB_AtX(), HB_IsRegExString(), HB_RegEx(), HB_RegExAll(), HB_RegExSplit(), LIKE |
Category: | Character functions , Regular expressions , xHarbour extensions |
Source: | rtl\regex.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com