NYCPHP Meetup

NYPHP.org

[nycphp-talk] typical regex question

Phillip Powell phillip.powell at adnet-sys.com
Tue Jul 20 17:10:30 EDT 2004


I would replace title="" with some other character comparator 
temporarily, a temp "swap" to prevent that particular occurrence of 
[a-zA-Z0-9\-_\.]+=["|']?[^"']*["|']? from pulling title="" with it.

That's off the top of my head.

Phil

Marc Antony Vose wrote:

> Hey there:
>
> Because every coding list needs a regex question every now and then, I 
> thought I'd contribute and fill the quota.
>
> I'm having a little personal struggle with replacing selected words in 
> a long article which is in HTML.  I want to search for words and 
> replace them with a link, but not if they are already inside a 
> title="" attribute of a tag.
>
> Don't need a complete solution, but some guidance would be 
> appreciated, since my efforts are currently resulting in failure.
>
> Cheers,
>


-- 
---------------------------------------------------------------------------------
Phil Powell
Multimedia Programmer
BPX Technologies, Inc.
#: (703) 709-7218 x107 
Fax: (703) 709-7219

	




More information about the talk mailing list