C# Regex help - retrieving a number from a sentence -


so have text need integer out of. here's examples of text like:

as low $99

you can $99 or less

i need number out of text, either or without $ sign.

can using regex.replace?

i use regex.match. can use following regex: ([0-9]+)

this assuming don't have commas, or decimals may mess up. if issue, add else inside [].

the match function return object tell if there matches along array of matches, , can found.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -