Archive
Posts Tagged ‘Regex’
Remove HTML tags using regular expressions
October 6, 2010
Leave a comment
Hi.
<\/?\w[^>]*>
or
<(.|\n)*?>
or
<[^>]+>
or
<\\??.+?>
or
<[^]+>
This will help u to remove all html tags.
Enjoy.. 😉 ..!!!
Advertisements
Extract content within tags : Regular Expression
October 6, 2010
Leave a comment
By this you can extract content which is in span tag or any tag
<span[^> ]*>(.*?)</span>
here you can use any tag like h1 or p etc…
Enjoy.. 😉 ..!!!