Subj : Re: [regexp] Excluding specified string To : comp.programming From : Piotr 'Qertoip' =?iso-8859-2?Q?W=B3odarek?= Date : Sat Oct 08 2005 04:24 pm Dnia Sat, 08 Oct 2005 12:06:59 GMT, John W. Krahn napisał(a): > Piotr 'Qertoip' W³odarek wrote: >> I want to match " SQL", but only if it is not preceeded by "Microsoft". >> Example: >> "abcrofrtg SQL" is match. >> "Microsoft SQL" is not a match. >> >> Of course I know how to exclude a single character ([^a]) but how can I >> exclude the whole string? > > $ perl -e' > for ( "abcrofrtg SQL", "Microsoft SQL" ) { > print /(? } > ' > Matched: abcrofrtg SQL > Did not match: Microsoft SQL Works perfect, thank you. -- | Piotr 'Qertoip' Włodarek | www.piotr-wlodarek.pl `-> Software Engineering 4 Those Who Care About The Craft .