1

Word boundaries are not taken in account if the letter near the word boundary is accentuated:

"aé ae".match(new RegExp("é\\b", 'igu')); // null
"aé ae".match(new RegExp("e\\b", 'igu')); // ["e"]

How could I make it work?
Three requirements:

  • I need to use the RegExp constructor (as the word to match is variable)
  • It's not envisageable to replace all accents
  • The solution needs to work on both sides: \bword\b
zessx
  • 68,042
  • 28
  • 135
  • 158
  • 1
    Not an answer, but you might check out the [XRegExp](http://xregexp.com) library, which is rather more complete and flexible than JavaScript's built-in RegExp. – T.J. Crowder Dec 08 '16 at 11:25

0 Answers0