Re: regular expression question

Karsten Nyblad <d148f3wg02@sneakemail.com>
10 Jun 2005 22:14:46 -0400

          From comp.compilers

Related articles
[3 earlier articles]
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)
Re: regular expression question mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2005-06-12)
| List of all articles for this month |

From: Karsten Nyblad <d148f3wg02@sneakemail.com>
Newsgroups: comp.compilers
Date: 10 Jun 2005 22:14:46 -0400
Organization: Compilers Central
References: 05-06-045 05-06-054
Keywords: lex

Nicola Musatti wrote:
> 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] | ......*


Your RE fails to accept strings of length 5 were either first letter is
h or second letter e or third or fourth letter l or fifth letter o,
e.g., it fails to recognize "fails".


Karsten Nyblad





Post a followup to this message

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