in reply to Re: Substitution with regexes in variables
in thread Substitution with regexes in variables

It is probably better to use Text::Balanced's extract_quotelike function rather than hand-rolling a substitution parser. (At least, the documentation suggests that it will handle s///'s correctly; and your code makes no effort to handle differently delimited patterns, among the (I assume) many other possible perversions.)

Replies are listed 'Best First'.
Re^3: Substitution with regexes in variables
by ikegami (Patriarch) on Nov 15, 2009 at 07:56 UTC

    That would allow other delimiters, but that would make it *more* complicated from a security standpoint. I didn't want to spend time thinking of the implications.

      That would allow other delimiters, but that would make it *more* complicated from a security standpoint.
      Ah, I guess in the sense that it wouldn't strip out refuse to allow escapes (as you have done), and that sort of thing?