Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Regexp
- Date: Thu, 06 May 2004 14:20:22 +0900
- From: "Daniel Quimper" <dq@example.com>
- Subject: Re: [tlug] Regexp
- References: <opr7ijemu64iw62b@example.com> <87ekpzb708.fsf@example.com> <opr7isfdum4iw62b@example.com> <20040505125919.GG8036%jmglov@example.com>
- Organization: Ubit.com
- User-agent: Opera M2/7.50 (Linux, build 663)
On Wed, 5 May 2004 08:59:19 -0400, Josh Glover <tlug@example.com> wrote: > Quoth Daniel Quimper (Wed 2004-05-05 06:24:39PM +0900): > >> Seriously, I need to parse out a much longer string then just "abc". And >> looking at what you wrote, the regexp would be too long to be >> implementable. > > Do it in Perl, if you have the option: > > $line !~ /abc/; Change the software is not an option because it's already parsing other string. So I can not change the "if" statement to inverse it. Also, I found a wierd syntax what would negate a string. Something like: (?!abc) But, I got two problem with it. First it's not implemented in the language the software is written in. And second, it requires to add something in front of it to work properly. Like if I knew that the string I want to accept all have numbers before the potentially present "abc", I could write: [0-9]+(?!abc) But as I want to accept all other strings except those that include "abc". It's not possible. btw, this doesn't work: .*(?!abc) > And if Perl is not an option, maybe you can still use it to generate the > ridiculous regexp that Dr. Turnbull (he *is* a Doctor of Regexpology, > you know)[1] spewed your way. Generating the regexp with a scripting language would would be an interesting exercise... I'm not sure I'm up to it though... :) If anyone have the time to try, please let me know. Maybe Dr. Turnbull[2] can amaze us with his skills :) > [1] D:IAALB (Disclaimer: I Am A Lying Bastard) [2] D:IAAFB (Disclaimer: I Am A Fervent Beleiver) dan...
- References:
- [tlug] Regexp
- From: Daniel Quimper
- Re: [tlug] Regexp
- From: Stephen J. Turnbull
- Re: [tlug] Regexp
- From: Daniel Quimper
- Re: [tlug] Regexp
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: [tlug] Sarge Debian Kde and Gnome won't work
- Next by Date: Re: [tlug] gmail (was: Is Linux Helping MS to make Windows better?)
- Previous by thread: Re: [tlug] Regexp
- Next by thread: Re: [tlug] Regexp
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links