Hi,
I'm having the following problem and wondered whether anyone could see why this is crashing my .net worker process (aspnet_wp.exe):
Dim pattern As String = "\{\{IF\(((?!\)}})(.))+,,,((\s)*(?!\)}})(.))+\)}}"
Dim mc As RegularExpressions.MatchCollection = Regex.Matches(txtContent.Text, pattern)
Works absolutely fine if a match is found, e.g
<h3>Title</h3>
<p>Top paragraph.</p>
{{IF(1=2,,, <p></p>)}}
But if no match is found it seems to nail my cpu and run for quite a while, e.g if the last bracket is missing before the final two curly brakcets:
<h3>Title</h3>
<p>Top paragraph.</p>
{{IF(1=2,,, <p></p>}}
Is it too greedy that it searches forever!? Thanks!