in reply to How can I match this }\n} in perl
Without more information, that regex would work. Is it perhaps there's whitespace you're not accounting for, since it looks like you're searching for braces that end a block?
If that's the case, I think you would want /}\n\w*}/ There's also a possibility you're editing a document from another filesystem, and newline is defaulting to your system. /}\n\r?}/ catches both Linux-y/Windows line endings.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I match this }\n} in perl
by haukex (Archbishop) on Feb 22, 2019 at 20:08 UTC | |
by chenhonkhonk (Acolyte) on Feb 23, 2019 at 23:59 UTC |