in reply to Re: Converting a stringified regexp back into a regexp
in thread Converting a stringified regexp back into a regexp
Indeed I only do the re-building of the regexp once, afterwards I keep a hash $hash{"$regexp"} = { regexp => $regexp, value => $value }; (actually it's handler instead of value, but you get the idea).
update: sorry, I did not understand your comment I think. I _have_ to get the regexp passed as a string, in order to keep backwards compatibility. And as this is for XML::Twig, I don't think I can go about changing the code that uses it ;--(
|
|---|