| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Searches and replaces characters within a character string using a regular expression.
HB_RegExReplace(<cRegEx> , ;
<cString> , ;
<cReplace> , ;
[<lCaseSensitive>], ;
[<lNewLine>] , ;
[<nMaxMatches>] , ;
[<nWichMatch>] ) --> cNewString
The function returns a copy of <String> where substrings matching the regular expression are replaced with <cReplace>.
Function HB_RegExReplace() searches a character string using a regular expression and replaces matching substrings with <cReplace>. It is similar to the function StrTran() but more powerful since the search condition is a regular expression.
| See also: | HAS, HB_AtX(), HB_RegEx(), HB_RegExAll(), HB_RegExComp(), HB_RegExSplit(), LIKE, StrTran(), Stuff() |
| Category: | Character functions , Regular expressions , xHarbour extensions |
| Source: | rtl\regexrpl.prg |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
http://www.xHarbour.com