![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GnuWin32 2.4.12 (LibArchive branch) | iBot | Software Releases - RSS News | 0 | 05-10-2008 07:40 PM |
| regexp help | TinCanFury | Shell Programming and Scripting | 0 | 04-06-2008 07:21 PM |
| tcl: regexp matching special character | sumitgarg | Shell Programming and Scripting | 6 | 01-09-2008 06:00 PM |
| regexp with sed again!!! | andy2000 | Shell Programming and Scripting | 2 | 05-03-2007 11:15 AM |
| regexp | penfold | UNIX for Advanced & Expert Users | 1 | 06-28-2005 08:45 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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) |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|