I am trying to parse the digits to store in a variable from a string in VB.NET (would like to also include the decimal point).
Here is an example string: Refund issued for $27.74
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As casperOne already pointed out, one example is not sufficient to give a full solution.
The regular expression string could look like
"\\$([0-9]+\\.[0-9]+)"or"Refund issued for \$(?<Value>[0-9]+\.[0-9]+)". The latter being more more restrictive.The second example also uses a named group. This can make it easier to extract the matches after the call to Regex.Match if you have a more complex scenario.
A nice tool to play around with .net style regular expressions is Expresso.