Re: regular expression question

"Nicola Musatti" <nicola.musatti@gmail.com>
9 Jun 2005 15:45:31 -0400

          From comp.compilers

Related articles
regular expression question gvheurn@gmail.com (Gijs) (2005-06-08)
Re: regular expression question gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-06-08)
Re: regular expression question 148f3wg02@sneakemail.com (Karsten Nyblad) (2005-06-08)
Re: regular expression question daw@taverner.cs.berkeley.edu (2005-06-08)
Re: regular expression question gvheurn@gmail.com (Gijs) (2005-06-09)
Re: regular expression question nicola.musatti@gmail.com (Nicola Musatti) (2005-06-09)
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)
[1 later articles]
| List of all articles for this month |

From: "Nicola Musatti" <nicola.musatti@gmail.com>
Newsgroups: comp.compilers
Date: 9 Jun 2005 15:45:31 -0400
Organization: http://groups.google.com
References: 05-06-045
Keywords: lex

Gijs wrote:
[...]
> So for example I want to have a RE that matches all strings except for
> the string "hello". How do you do this?


How about something like:


. | .. | ... | .... | [^h][^e][^l][^l][^o] | ......*


i.e. accept all strings of length different from 5 and all strings of
length 5 that are not "hello" (I have to confess that I did read the
other messages in this thread :-).


Cheers,
Nicola Musatti


Post a followup to this message

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