I have a string
string str = "I am fine. How are you? You need exactly 4 pieces of sandwiches. Your ADAST Count is 5. Okay thank you ";
What I want is, get the ADAST count value. For the above example, it is 5
.
The problem here is, the is
after the ADAST Count
. It can be is
or =
. But there will the two words ADAST Count
.
What I have tried is
var resultString = Regex.Match(str, @"ADAST\s+count\s+is\s+\d+", RegexOptions.IgnoreCase).Value;
var number = Regex.Match(resultString, @"\d+").Value;
How can I write the pattern which will search is
or =
?