in reply to Re^2: Can qr be un-compiled?
in thread Can qr be un-compiled?
I don't immediately have the means of converting a Perl regexp pattern into a JavaScript regexp pattern, but I got you half way there by answering your question. "[a-z].*?[0-9] $" would not be equivalent to the compiled regexp.
If you're dealing with the subset that's compatible to both, why don't you just keep the pattern and the compiled regexp separately?
my %regexps = map { $_ => qr/$_/ } @regexps;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Can qr be un-compiled?
by cosmicperl (Chaplain) on Feb 03, 2009 at 14:52 UTC | |
by ikegami (Patriarch) on Feb 03, 2009 at 15:43 UTC |