after investigating for a while, finally I found sed does not support lookahead or lookbehind assertions.
Based on http://sed.sourceforge.net/sedfaq6.html, the modified sed, which is named as ssed, can support it in its Perl mode.
Tuesday, July 5, 2011
Subscribe to:
Post Comments (Atom)
3 comments:
Aiy, had been trying to do a negative look-ahead as described here: http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word
And I failed miserably with sed. Thanks to your post I tried 'ssed -R' and that worked right away - thanks a lot!
Thanks from Dortmund, Germany.
Solved my problem.
Linux : positive and negative sides
Post a Comment