![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Negative Offset | DNAx86 | High Level Programming | 1 | 05-09-2008 05:04 PM |
| C++ how to isdigit() a negative number? | Darklight | High Level Programming | 1 | 04-22-2008 12:01 PM |
| negative permissions | sickoboy | UNIX for Dummies Questions & Answers | 4 | 10-12-2006 06:49 PM |
| RegExp negative match not working | umen | Shell Programming and Scripting | 2 | 08-22-2006 01:57 PM |
| negative UID/GID?!! I can see 'em but what the hell do they mean?! | hellz | UNIX for Dummies Questions & Answers | 2 | 09-07-2001 12:18 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Problem with sed and negative regexpr's
I have a file with various syntax that I'm try to run sed on to change over a specific regexp and having problems. I want to swap all instances of a token so long as the token isn't followed by either an alphanumeric character, an underscore, or an exclamation point.
The test file looks like this: test test4 testF test! test;test I'm trying to run sed like this % sed -e 's/test[^[:alnum:]&^_&^\!]/FFF/g' test What I see is this which is close but not exactly what I'm looking for: test test4 testF test! FFFtest Notice the last entry does not have a ";" between FFF and test. Is there something I can use in the replace string to represent that I want to print out the negated matched expression found? |
| Forum Sponsor | ||
|
|