Regex with String Match


#1

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

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


#3

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


#4

“Chalk not a Cheese”

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


#6

Its GREAT Vaidya…Thanks for your help.