Problem with Regular Expressions and Apostrophes
Posted on 2007-04-06
I am having a quirky issue with some regular expressions I am using in a program that is parsing some text.
This is the regular expression I have: \d*\W\d*\W
and it matches things like: 950.56'
I've tested this and it returns the way I want when I throw the results into a list box so I get like: 950.56'
However, when I grab the results like this: results = Regex.Matches(resultsTemp.Value, strRegularExpression, RegexOptions.IgnoreCase | RegexOptions.Singleline);
Where resultsTemp is another matchcollection, it throws it into those results such that it is now "950.56 " (without the quotes but with the new trailing space).
Any ideas why it is doing this?