Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27348

VS 2010 Regex Help...Extracting distances from a line of text.

$
0
0
I have the following line of text

3 Smith, Nathan I5 Elite 13-07.75 15-05.25
and would like to extract the last distance (15-05.25). Its ok if I get both however. This is the pattern that I'm using:
\d+\s*[.'-]\s*\d+[.']\s*\d+\s*[.*m chr(34)]*\s*[^-\d*]*\s*\d*[chr(34)]*\s[^\d]

Unfortunatley, it only pulls the first distance (13-07.75).

The pattern is designed to extract distances given in many different formats.

Thank you.
Adrian

Viewing all articles
Browse latest Browse all 27348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>