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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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