(?<!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
In reply to Re: substitution with exceptions
by LanX
in thread substitution with exceptions
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |