in reply to Perl regex limitations
Yeah, at least some of the time, * becomes {0,32767}.
use re 'debug'; my $braces = qr/(?<braces>\{ ([^\{\}] | (?&braces))*? \} )/x; Compiling REx "(?<braces>\{ ([^\{\}] | (?&braces))*? \} )" Final program: 1: OPEN1 'braces' (3) 3: EXACT <{> (5) 5: MINMOD (6) 6: CURLYX[0] {0,32767} (29) 8: OPEN2 (10) 10: BRANCH (22) 11: ANYOF[\0-z|~-\377][{unicode_all}] (26) 22: BRANCH (FAIL) 23: GOSUB1[-22] (26) 26: CLOSE2 (28) 28: WHILEM[2/1] (0) 29: NOTHING (30) 30: EXACT <}> (32) 32: CLOSE1 'braces' (34) 34: END (0) anchored "{" at 0 floating "}" at 1..2147483647 (checking floating) mi +nlen 2 Freeing REx: "(?<braces>\{ ([^\{\}] | (?&braces))*? \} )"
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl regex limitations (*)
by tye (Sage) on Aug 06, 2014 at 04:13 UTC | |
|
Re^2: Perl regex limitations (32k)
by oiskuu (Hermit) on Aug 06, 2014 at 12:21 UTC | |
by jonneve (Initiate) on Aug 06, 2014 at 13:20 UTC | |
by jonneve (Initiate) on Aug 06, 2014 at 14:03 UTC | |
by Anonymous Monk on Aug 06, 2014 at 16:08 UTC |