Tugger the SLUGger!SLUG Mailing List Archives

[SLUG] Regex - Not (^) in bracketed list [] does not work properly



---------------------- Forwarded by V Kamakhya/MLs/TCSCHENNAI on 10-11-2000
11:28 ---------------------------

Hi,
In a c file, I defined:
#define [^{]+[' ']+XYZ
The idea is to prevent occurence of '{' before XYZ
and used REG_EXTENDED in regcomp

I got the following output for valid and invalid patterns

a{  XYZ - Invalid
a{{ XYZ - Invalid
{a{  XYZ  - Invalid
a{a  XYZ - Valid    -- how did this happen?
a{a{ XYZ  - Invalid.
{a  XYZ  - Valid      -  how did this happen?
{aa XYZ   - Valid   - How did this happen?


I am thoroughly confused. Help!

Kam