Last post Aug 31, 2010 06:22 PM by jeppe_r
Aug 31, 2010 05:19 PM|jeppe_r|LINK
I'm hoping someone out there know a way to accomplish what I'm trying to do, because I'm currently stuck :)
What I want to do is to replace lets say ##test## with Something(test)..
I know that I can find ##test## by: (Though don't know whether there's a smarter way)
System.Text.RegularExpressions.Regex.Replace(str, "##Test.*##", "Output")
So basically the problem is to get what the wildcard (.*) is, since thats really what I need to know..
Anyone with a brilliant idea how to accomplish this?
Aug 31, 2010 05:38 PM|asaid|LINK
check this link it may help
Aug 31, 2010 06:22 PM|jeppe_r|LINK
Finally I succeeded!
My result (if anybody else should have this question):
Dim yay As String = MyString
For Each match As Match In regex.Matches(yay, "##.*##")
yay = yay.Replace(match.value, match.value & "Y")
label.Text = yay