regex exclude <font> inside <font>
Posted: Fri Sep 29, 2006 3:25 am
I want it to match this
but I dont want it to match this.
What I want is that I dont want any font tag including another font inside.
I tried this.
this works only when the text inside the font tags doesn't start with font. But when the font is in the middle or at the end, it doesn't work.
I have read about the exclusion patterns. But I couldn't make them work for me.
Please help me. Thanks....
Code: Select all
<font size="4">some text or some tags</font>Code: Select all
<font size="4">some text <font size="4>some text</font>dfssdfsdddf</font>Code: Select all
<font size="4">some text or some tags excluding font tag</font>I tried this.
Code: Select all
/(<font size="\d+">)(?!<font)(.*?)(<\/font>)/iI have read about the exclusion patterns. But I couldn't make them work for me.
Please help me. Thanks....