Originally Posted by geekdude
I have figured out how to write a regular expression to specify this data I want to delete using the search funciton in the text editor TextWrangler:
That regular expression uses Positive lookbehind assertion
(?<=...) and Positive lookahead assertion
(?=...), sed doesn't support these. Also, sed only matches one line at a time, unless you jump through some hoops.
This works in text wrangler but when I try to use it with sed it gives me errors like this one:
sed: 1: "(?<=<div id="right_col" ...": invalid command code (
For sed, you need to use the regular expression as part of a command, eg:
which means replace whatever some-regular-expression
matches with nothing.