in reply to Re: Elegant way to escape a string in a regex
in thread Elegant way to escape a string in a regex

good idea, it suits me fine and eliminates all problems, thanks.

  • Comment on Re^2: Elegant way to escape a string in a regex

Replies are listed 'Best First'.
Re^3: Elegant way to escape a string in a regex
by LanX (Saint) on Apr 14, 2025 at 23:34 UTC
    If you use fixed templates, maybe consider sprintf or - depending on the number of templates - just variable interpolation.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery