yahoo pipes regular expressions

technica

Newbie
Joined
Dec 21, 2008
Messages
18
Reaction score
0
Hi,

I am working hard to get solution for some reg expressions for yahoo pipes.

1) reg expression to remove all the empty tags from the feed html. The tags can be anything like <div></div>,<span></span>,<div id=""someid></div>,<div class="someclass"></div> etc.

2) reg expression to remove certain tag and all the content within it. e.g. <noscript>test test <a></a></noscript>, here I want to remove <noscript> tag and all the content from it.

Please help frinds.
 
youd get better results to your question in the programming section....

You should also tell people what language you're coding in. For arguments sake ill assume is .NET

theres regular expressions everywhere that strip html tags, google it.

but look into a function people have written called getstringinbetween , it finds a string in between two specified strings...

for the no script one, couldnt you just do a regex replace like

regex.replace(source,"<noscript>.*?</noscript>" ,"")

dunno if that will work, thats just off the top of my head.
 
Back
Top