Nested tags

R

reflex

Hi,

i have string which looks like:
"<P><SPAN style="FONT-SIZE: 12pt">asdas<SPAN style="FONT-SIZE:
10pt">jdlkasjlk<SPAN style="FONT-SIZE: 8pt">djk<b>las</b>jkldjakldj</
SPAN>klajkld</SPAN>ajkldkl</SPAN></P>"

and i have to get this one "<SPAN style="FONT-SIZE: 8pt">djk<b>las</
b>jkldjakldj</SPAN>" then remove it and take this one "<SPAN
style="FONT-SIZE: 10pt">jdlkasjlk<SPAN style="FONT-SIZE:
8pt">djk<b>las</b>jkldjakldj</SPAN>klajkld</SPAN>" and soo again

i write function:

var reGee = /(<span([^>]*)>)([^<]*)<\/span>/igm;


while(sel.match(reGee)) {
//remove match
}

but it only works when there is no element inside nested span...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,161
Messages
2,570,892
Members
47,427
Latest member
HildredDic

Latest Threads

Top