|
GnuWin32 sed 4.1.4 regexp matching
I am using GnuWin32 sed and am having trouble with the regexp - i.e., they don't behave the same way as in UNIX (POSIX and and all that). I have a stream of data, e.g.:
11111'222?'22'33?'333'44444'55555'
I want to insert a \n after those apostrophes that are *not* preceded by a ?.
Expected output:
11111'
222?'22'
33?'333'
44444'
55555'
I used the substitution:
s/\([^?]\)'/\1'\n/g
this should be OK but it didn't work... it replaced those that *did* have a ? in front - I want the opposite.
Any gurus with a suggestion? (apart from sticking to UNIX)
|