Reputation: 25
"Transaction against Invoice No #100084# entered and 2 more pending"
This is the string and how can i split the digit inside two character(#
#
) ie:100084
Upvotes: 1
Views: 136
Reputation: 1396
Try using this
string[] values = Regex.Matches(msgText, @"\#.*?\#").Cast<Match>().Select(m => m.Value).ToArray();
EDIT:
msgText
is the string input. This array will contain the string with # character. #10824#
. you can replace the same
Upvotes: 2
Reputation: 8950
"Transaction against Invoice No #100084# entered and 2 more pending".Split('#')[1]
Upvotes: 0