Search a string for certain numbers
- by Hassan Gulzar
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?