Regular Expressions Recursion Recurse the whole pattern

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

The construct (?R) is equivalent to (?0) (or \g<0>) - it lets you recurse the whole pattern:

<(?>[^<>]+|(?R))+>

This will match properly balanced angle brackets with any text in-between the brackets, like <a<b>c<d>e>.



Got any Regular Expressions Question?