k, I'm runnig a loop over a Regex.Replace method i C# and I want the pattern to match only ONCE!
strLayout = "<p>;;firstname;;</p><p>;;lastname;;</p>";
for (int i=0;i<2;i++)
strLayout = Regex.Replace(strLayout,";;[^;]*;;",dbRow[i].ToString());
the resulting strLayout will look something like this in the after the first loop "<p>Firstname</p><p>Firstname</p>";
and then no matches will be found in the second loop which would print this if things get the way I want them.
seems to me it would be setting the whole pattern to non-greedy but I don't know how to do that, and noone else that I've asked either, and I haven't found any example in any regular expression documentation. If you know this please break this one for me.