Home > Software engineering >  Regex match with accent in text and not in query
Regex match with accent in text and not in query

Time:10-27

I'm looking for a regex that match the keyword pepe in the string Pépé Dominguez

enter image description here

I don't want to sanitize the Pépé dominguez string before test.

CodePudding user response:

If you only need to match Pepe or Pépé, i would just do this:

/pépé|pepe/gi

Simple, but it works.

  • Related