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

[RESOLVED] regex question

$
0
0
I have a regex expression, that matches decimal numbers, but I also want it to recognise currency or a percentage.

Code:

Dim rx As New Regex(String.Format("({0})?((\d+\.)?\d+)\%?", currencySymbol))
the last part of the pattern "\%"... I only want that to be a possible match if groups(1).value = ""

so it'd match £50.50 + it'd match 12.34%, but not £56.78%

Viewing all articles
Browse latest Browse all 27210


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