c++.rtl - The regular expression language used is the same as that commonly used
- Nicholas Jordan (26/26) May 07 2006 Trying to get going on regular expressions.
- Walter Bright (2/3) May 12 2006 It's the same r.e. language defined by the ECMA 262 specification.
- Nicholas Jordan (2/5) Jun 18 2006 Thanx
Trying to get going on regular expressions. The owl book gives: echo =XX========================================= | egrep 'X(.+)+X' as a test to determine whether one's regex uses an NFA or DFA engine. To gain fluency & efficiency, I tried something like: RegExp re; char pattern[] = {"X(.+)+X"}; char string[] = {"=XX========================================="}; if(re.compile(pattern,"i",0x0001)) { ::printf("pattern compiled"); if(re.test(string)) { ::printf("string searched"); } } This run did not get to the second printf() To say that: The regular expression language used is the same as that commonly used .... may be an innovative use of K.I.S.S, one that I have not thought of. Also, noticed that the i option failed to compile if I uses single quotes - only worked if I used double quotes. Reading the compiler .hlp files samples indicates this should not happen. Which regular expression language is the one commonly used ? There are several. Nick http://www.docdubya.com/belvedere/statement/index.html
May 07 2006
Nicholas Jordan wrote:Which regular expression language is the one commonly used ?It's the same r.e. language defined by the ECMA 262 specification.
May 12 2006
In article <e42l48$2v2d$1 digitaldaemon.com>, Walter Bright says...Nicholas Jordan wrote:ThanxWhich regular expression language is the one commonly used ?It's the same r.e. language defined by the ECMA 262 specification.
Jun 18 2006