Search a string for certain numbers
Posted
by
Hassan Gulzar
on Stack Overflow
See other posts from Stack Overflow
or by Hassan Gulzar
Published on 2011-01-14T07:18:19Z
Indexed on
2011/01/14
11:53 UTC
Read the original article
Hit count: 151
Hello!
I'm trying to come up with a lightning fast solution to find portions in a string. Here is a Sample string:
"PostLoad successful! You transferred amount of 17.00 Rs to 03334224222. Now use PostLoad by dialing 123. PostLoad on SMS will end on 01-03-2011."
Objective: Need to retrieve the bold values: Amount and Cell Number. The string contents change slightly but the cell number will always be a 11 digit. The amount is always with two decimal precision. Any suggestions using C# and RegEx?
© Stack Overflow or respective owner