in reply to Re: How can I match this }\n} in perl
in thread How can I match this }\n} in perl

whitespace you're not accounting for ... If that's the case, I think you would want /}\n\w*}/

That should probably be /}\n\s*}/, since \w means a word character.

/}\n\r?}/

That should probably be /}\r?\n}/, since \n\r would be LFCR (see also).

Replies are listed 'Best First'.
Re^3: How can I match this }\n} in perl
by chenhonkhonk (Acolyte) on Feb 23, 2019 at 23:59 UTC

    Thanks. I don't use regex too often anymore but I mostly remember it!