Forum Moderators: coopster

Message Too Old, No Replies

preg replace problem

         

scorpse

2:19 pm on Jan 31, 2008 (gmt 0)

10+ Year Member



i have a slight problem in using preg_replace,. in act the regex.

i need an expresion to search for a word inside a text, but not inside tags atributes, and not inside a tag, bun insie other tags.

i am using


$search_tmp = array("/(?!(?:[^<]+>¦[^>]+<\/a>))\b(".$search[$i].")\b/is");

but i will search in sthe href of the a tag.

can u provide some help?

tanks

[edited by: eelixduppy at 11:06 pm (utc) on Jan. 31, 2008]
[edit reason] disabled smileys [/edit]

phparion

6:39 pm on Feb 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



can you post a sample of your search string so that i can play with it :)