RE: Advanced regex question - backtracking vs. negative lookahead s

2006-04-21 Thread Bowie Bailey
David Landgren wrote: > Bowie Bailey wrote: > > [...] > > > > An alternative solution would be this: > > > > > > /style="[^>]+color:blue/ > > > > This looks better. It is probably less resource-intensive than > > your previous attempt and is definitely easier to read. But why > > are you look

Re: Advanced regex question - backtracking vs. negative lookahead s

2006-04-21 Thread David Landgren
Bowie Bailey wrote: [...] An alternative solution would be this: /style="[^>]+color:blue/ This looks better. It is probably less resource-intensive than your previous attempt and is definitely easier to read. But why are you looking for > when you anchor the beginning with a quote? How ab

RE: Advanced regex question - backtracking vs. negative lookahead s

2006-04-21 Thread Bowie Bailey
Jeremy Fairbrass wrote: > > Let's say I want to use regex to search for the phrase "color:blue" > within a tag as in the example below (just a made-up example > for the sake of this question): > > > > In this case, the "color:blue" part is preceeded by some other text > ("border:0px") after th