Alright, I've spent the last few hours trying to figure out Regular Expressions, as they seem suited to what I'm trying to do. ...problem is, I'm not sure how to go about that.
What I need is an expression that can take a word in a string in parenthesis (for example, "Todd lives on (StreetName) Street.") and replace - in this example, (Streetname) - with user-created input, ideally from an inputbox. It's worth noting that (StreetName) can be anything...(Pos t), (TreeStump) etc.
So, in summary: A wildcard search (as "(*)"), that then replaces the string in-between the parenthesis with a user-input string.
I must admit, I'm stumped...RegEx is daunting, to say the least. Of all the things I've learned or tackled in VB.NET, it's the only thing that still leaves me utterly confused. Any ideas?
What I need is an expression that can take a word in a string in parenthesis (for example, "Todd lives on (StreetName) Street.") and replace - in this example, (Streetname) - with user-created input, ideally from an inputbox. It's worth noting that (StreetName) can be anything...(Pos t), (TreeStump) etc.
So, in summary: A wildcard search (as "(*)"), that then replaces the string in-between the parenthesis with a user-input string.
I must admit, I'm stumped...RegEx is daunting, to say the least. Of all the things I've learned or tackled in VB.NET, it's the only thing that still leaves me utterly confused. Any ideas?
Comment