Partial matching with Regex doesn't work


#1

I wrote a code like

Regex.IsMatch(“Kate”,".ate|K.te|Ka.e|Kat.|")
//need to match like Kate Kata Mata Kaka Kati

but all string matched to this expression
what is the problem?


#2

Did you try removing the last pipe in the regex?. Like this Regex.IsMatch(“Kate”,".ate|K.te|Ka.e|Kat.")

Thanks,
Rammohan B.


#3

Hi @Rammohan91
It worked perfectly ! and was easy Regex mistaking…

Thanks a lot!