joerg.ludwig has asked for the wisdom of the Perl Monks concerning the following question:
The regex to match a double-quoted string from the perl doc (http://perldoc.perl.org/perlre.html#Quantifiers) does not work for long strings:
# perl -we '(q(").(q(\a)x50000).q(")) =~ /"(?:[^"\\]++|\\.)*+"/' Complex regular subexpression recursion limit (32766) exceeded at -e l +ine 1.
How can this regex be rewritten to support strings of arbitrary length?
Thx in advance. :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Complex regular subexpression recursion limit
by ikegami (Patriarch) on Dec 03, 2009 at 16:35 UTC | |
by JadeNB (Chaplain) on Dec 03, 2009 at 17:29 UTC | |
by ikegami (Patriarch) on Dec 03, 2009 at 17:52 UTC | |
by JavaFan (Canon) on Dec 03, 2009 at 17:51 UTC | |
by JadeNB (Chaplain) on Dec 03, 2009 at 17:58 UTC | |
by ikegami (Patriarch) on Dec 03, 2009 at 18:27 UTC | |
by rsFalse (Chaplain) on Oct 28, 2014 at 19:25 UTC |
Back to
Seekers of Perl Wisdom