Regex with String Match

HI all,

I want to match a string based regex …can anyone help me in it…

Query: Input: I am an Indian not a Pakistani…

Here I want to get string in between Indian and Pakistani using Regex…

So can anyone help me with the following query…

Regex.Matches(vStrInput,pattern)

2 Likes

You requirement wants you to use Regex only? Or Can you use IndexOf and Substring?

I have done that in IndexOf and SubString method… I want check in REGEX method… So can you help me in it…

“Chalk not a Cheese”

Regex.Match(strQuote,"(?<=Chalk)(.*?)(?=Cheese)").Groups(1).Value

4 Likes

Its GREAT Vaidya…Thanks for your help.