RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
<(?<tag>.*).*>(?<text>.*)</\k<tag>>
Description
Match the content of any regular tag/s
Matches
<body>Content here</body>
Non-Matches
<body>Content here<body>
Author Rating: The rating for this expression. luca milan
Source <(?<tag>.*).*>(?<text>.*)</\k<tag>>
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Dot-star allowing for too much backtracking
Name: Darren Neimke
Date: 10/13/2003 6:28:29 PM
Comment:
A lot of that .* stuff that you've got in there will lead to unneccessary backtracking and therefore, quite a bit of inefficiency. Try to reduce it, maybe something more along the lines of: <(?<tag>\b\w+\b)[^>]*>(?<text>.*?)</\k<tag>>


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials