Regular Expression to Grab the Content of an XML Element

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

If there will be multiple sets of these tags in a scanned XML string, you need the '?' after the '*' to specify a non-greedy (lazy) match.

Copy this code and paste it in your HTML
  1. (?<=Message\>)[\S\s]*?(?=\<\/Message)

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.