|
2008-11-28
| ||
| 22:29 | • Ticket [2354440fff] Limitation on length of characters in regexp status stil... artifact: 8a1b8c9b47 user: ferrieux | |
| 22:03 | • Closed ticket [2354440fff]. artifact: e5b3e1d88b user: dkf | |
| 00:02 | • New ticket [2354440fff]. artifact: 39507d685b user: nobody | |
Limitation on length of characters in regexp
Closed / Wont Fix2354440fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2008-11-28 00:02:10
Tcl can not compile regular expression like
regexp {.{x}} $a,
whete $a is string with length more than 256 characters, x is number of characters more than 256. Error message is "couldn't compile regular expression pattern: invalid repetition count(s)"
Will be good, if i can use any x in one expressions.
dkfplain2008-11-28 22:03:07
Allowing this sort of thing unfortunately makes the RE engine blow up on other REs (I forget which bug number dealt with this) as handling counted repetitions is expensive.
ferrieuxplain2008-11-28 22:29:09
Notice that this bug report should have been a feature request, since the limit of 255 is documented in re_syntax.n.
It ends up as being _POSIX2_RE_DUP_MAX defined in system include file <limits.h> (or one of its offspring).
No idea what this value does in such a normative position since libc has no regexp support.
As it turns out, on my CentOS4.6, [egrep 'a{500}'] works... So, what set of tools is legally bound by _POSIX2_RE_DUP_MAX ?
Log in (anonymous is fine) to add a comment.