Re: regular expression question

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
12 Jun 2005 21:30:55 -0400

          From comp.compilers

Related articles
[6 earlier articles]
Re: regular expression question cfc@shell01.TheWorld.com (Chris F Clark) (2005-06-09)
Re: regular expression question snicol@apk.net (Scott Nicol) (2005-06-10)
Re: regular expression question snicol@apk.net (Scott Nicol) (2005-06-10)
Re: regular expression question d148f3wg02@sneakemail.com (Karsten Nyblad) (2005-06-10)
Re: regular expression question torbenm@diku.dk (2005-06-10)
Re: regular expression question skandgoe@gwdg.de (Skandinavisches Seminar) (2005-06-10)
Re: regular expression question mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2005-06-12)
| List of all articles for this month |

From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Newsgroups: comp.compilers
Date: 12 Jun 2005 21:30:55 -0400
Organization: cbb software GmbH
References: 05-06-04505-06-050 05-06-053 05-06-064
Keywords: lex
Posted-Date: 12 Jun 2005 21:30:55 EDT

On 10 Jun 2005 22:17:02 -0400, Skandinavisches Seminar wrote:


> "Gijs" <gvheurn@gmail.com> schrieb im Newsbeitrag
>> So I was hoping to easily invert a RE. But now I think I'll get a
>> rather complex RE, which I think the database field is too small
>> for. ;-) [...] if anyone has some other ideas, I'll really
>> appreciate this!
>
> I don't quite understand what the use is of matching everything except
> for a certain string.


It is not uncommon to match P1 terminated by P2. For example, an
argument of a function call is something terminated by comma,
)-bracket, ]-bracket etc. You don't want to match the terminator
itself, only the argument.


> As far as "other ideas" are concerned, my suggestion would be to
> consider whether using regular expressions is really the best way of
> getting what you want.


There are also more powerful classes of patterns than RE. They can
match "not P". For example:


http://www.dmitry-kazakov.de/match/match.htm


--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.