Skip to content Skip to sidebar Skip to footer

Regex Pattern Help: Finding HTML Pattern When Nested ASP.NET Eval?

http://regexr.com/3cgju Pattern = ((<\/?[\w\s='/.':;#-\/]+>)|(<\%@[\s\S]+\'\s%>)) When using this as a testing syntax: <%@ Page Language='C#' %> Copy

Demo: https://regex101.com/r/tE8nJ1/2


And this for .NET:

(?'o'<)(.*)(?'-o'>)+

Demo: link

Or:

(?'o'<)([^<>]*)(?'-o'>)+

to restrict capturing group, if you don't use newlines between lines.


Post a Comment for "Regex Pattern Help: Finding HTML Pattern When Nested ASP.NET Eval?"