We Recommend

Mastering Regular Expressions Mastering Regular Expressions
As this book shows, a command of regular expressions is an invaluable skill. Regular expressions allow you to code complex and subtle text processing that you never imagined could be automated. Regular expressions can save you time and aggravation. They can be used to craft elegant solutions to a wide range of problems. Once you've mastered regular expressions, they'll become an invaluable part of your toolkit. You will wonder how you ever got by without them.


Posted By

rhlowe on 07/20/07


Tagged

html find-and-replace


Versions (?)


Who likes this?

5 people have marked this snippet as a favorite

copyleft
naz
liqweed
wbowers
egoens


Grab an html tag and leave just the content


Published in: Regular Expression 


Developed for eclipse but prolly useful elsewhere, put the text after 'find' in the 'find' box and the text after 'replace' in 'replace'.

Note: this example uses an html list item 'li', make sure to replace that with the tag you want to find


  1. Find: <(li*)\b[^>]*>(.*?)</\1>
  2. Replace: $2

Report this snippet 

You need to login to post a comment.