![]() |
|
|
|
|
|||||||
| 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GnuWin32 2.4.12 (LibArchive branch) | iBot | Software Releases - RSS News | 0 | 05-10-2008 03:40 PM |
| regexp help | TinCanFury | Shell Programming and Scripting | 0 | 04-06-2008 03:21 PM |
| tcl: regexp matching special character | sumitgarg | Shell Programming and Scripting | 6 | 01-09-2008 02:00 PM |
| regexp with sed again!!! | andy2000 | Shell Programming and Scripting | 2 | 05-03-2007 07:15 AM |
| regexp | penfold | UNIX for Advanced & Expert Users | 1 | 06-28-2005 04:45 AM |
|
|
Submit Tools | LinkBack | Thread Tools | 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) |
| Forum Sponsor | ||
|
|
| Thread Tools | |
| Display Modes | |
|
|
|
The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
|
| 421 service not available, remote server has closed connection ^m automate ftp autosys awk trim bash eval bash for loop boot: cannot open kernel/sparcv9/unix command copy/move folder in unix couldn't set locale correctly curses.h cut command in unix export command in unix find grep find mtime find null character in a unix file grep multiple lines grep or grep recursive hp-ux ifconfig inaddr_any inappropriate ioctl for device lynx javascript mailx attachment mget mtime ping port remove first character from string in k shell replace space by comma , perl script rsync ftp scp recursive segmentation fault(coredump) sftp script snoop unix solaris change ip address stale nfs file handle syn_sent tar exclude tar extract to folder test: argument expected unix unix .profile unix forum unix forums unix internals unix mtime unix simulator unix.com vi substitute while loop within while loop shell script |