Title |
Test
Find
Pattern Title
|
Expression |
<(?i)(?=.[^>]*runat=["]?server)(?<TYPE>\S[^>\s]+).[^>]*id=["]?(?<NAME>\w+).[^>]*> |
Description |
This regular expression finds all opening tags that have the runat='server' attribute specified. It groups the type of the control (eg. asp:Label) in to a group named TYPE and the id of the control into a group named NAME.
It is useful for finding all server tags or controls in an ASPX (ASP.NET) page. |
Matches |
<asp:Label id="Label1" runat=server> | <TABLE id="tblTable" runat=serve |
Non-Matches |
<table class="tableclass"> | <asp:Label id="Label2"> |
Author |
Rating:
Shane O'Grady
|
Source |
|
Your Rating |
|
Title: Thank you!
Name: A satisfied reader
Date: 5/3/2012 2:17:08 PM
Comment:
Thank you very much!
I had to replace the xml escape sequences to use in .NET, after that, it worked out great. I needed to have the ID and tag type available to me. You saved me hours of work!