in reply to substitution with exceptions
(?<!foo) Negative Lookbehind Asserts that what immediately precedes the current position in the string is not foo
maybe try s/(?<!\bisn)(?<!\baren)'t/ 't/g
\b ensures a word boundary.
(actually in order to play save you should also check for a trailing boundary 't\b
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: substitution with exceptions
by choroba (Cardinal) on Sep 27, 2018 at 19:27 UTC | |
by LanX (Saint) on Sep 27, 2018 at 19:45 UTC | |
|
Re^2: substitution with exceptions
by haukex (Archbishop) on Sep 27, 2018 at 19:31 UTC | |
|
Re^2: substitution with exceptions
by Anonymous Monk on Sep 27, 2018 at 20:08 UTC |