G
Guest
I'm new at using Regex, and I'm using VB.NET.
I can't seem to get this to work. I'm replacing matched items in a text file.
The format is v (upper or lower) and then 4-5 integers.
I'm trying (many variations of):
'Replace version
newText = Regex.Replace(contents, "(\bv)([0-9]{4,5})", VersionNew,
RegexOptions.Multiline)
where; newVersion is just a string, and contents is the stream of the text
I can get this to work if I 'hard code' the item to replace in the file, but
I want to use regex since this might change.
I've been using 'http://regexlib.com/RETester.aspx' to help build the
expression.
All the examples are in C#, and whne I convert the characters '@' is not
recongized?
Help?
I can't seem to get this to work. I'm replacing matched items in a text file.
The format is v (upper or lower) and then 4-5 integers.
I'm trying (many variations of):
'Replace version
newText = Regex.Replace(contents, "(\bv)([0-9]{4,5})", VersionNew,
RegexOptions.Multiline)
where; newVersion is just a string, and contents is the stream of the text
I can get this to work if I 'hard code' the item to replace in the file, but
I want to use regex since this might change.
I've been using 'http://regexlib.com/RETester.aspx' to help build the
expression.
All the examples are in C#, and whne I convert the characters '@' is not
recongized?
Help?