in reply to Re: regex compilation
in thread regex compilation

Neat trick, thanks a lot.

So I need to double all the backslashes.

Replies are listed 'Best First'.
Re^3: regex compilation
by AnomalousMonk (Archbishop) on Feb 12, 2019 at 18:31 UTC
    So I need to double all the backslashes.

    I would say that you need to use  qr// to build Regexp objects. These objects behave essentially like strings in the situations in which you seem to be interested in using them.


    Give a man a fish:  <%-{-{-{-<

Re^3: regex compilation
by Laurent_R (Canon) on Feb 12, 2019 at 18:51 UTC
    So I need to double all the backslashes.
    Probably not. I think that you need to use qr//