Grab an html tag and leave just the content

/ Published in: Regular Expression
Save to your folder(s)

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

Copy this code and paste it in your HTML
  1. Find: <(li*)\b[^>]*>(.*?)</\1>
  2. Replace: $2

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.