[linux-help] Re: Regexp question
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Are you using grep, egrep, sed, awk, find? They all use slightly different sets
of regular expressions. The shell also expands regexs and changes the context
slightly. Is this a command line operation? For what it is worth, the *way*
over-simplified answer is a ^ at the beginning because that says not the
following however in certain cases it also means anchored to the start of a
line. Can you give more information?
-JR
/*********************************************/
Beware, I have only proven the above code correct,
not tested it.
- Donald Knuth
/*********************************************/
Jesse Kaufman wrote:
> Ok, I'm trying to get a regexp working to do the following:
>
> match anything that does not match /foobar.* and return it (ie: using
> "()"'s)... how would someone go about negating an entire regexpression
> (if that's what you'd call it..)?
>
> ie:
>
> "/foobar/blah" would match the above
> "/foobar" would match the above
> "/test" would not, and "/test" would be returned
>
> thanks,
> gLaNDix
>
> --
> Jesse Kaufman | WebSurf Internet Access
> Administration / Web Development | www.websurf.net
> glandix@xxxxxxxxxxx | Ph: 316.945.7873
> www.linuxfreak.com/~glandix | Fax: 316.946.9944
> --
>
> <<< Vim is a REAL man's text editor. I don't know why anyone else would
> even bother with sissy programs like emacs, or even worse... pico! >>>
>
> -- This is the linux-help@xxxxxxxxx list. To unsubscribe,
> visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
-- Binary/unsupported file stripped by Listar --
-- Type: text/x-vcard
-- File: jmresler.vcf
-- Desc: Card for John
-- This is the linux-help@xxxxxxxxx list. To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
|
|