A website I'm modding with a userscript has some text I want to modify. The text appears to have a unicode character in it. When I look at it on screen or even extract it to a variable with jQuery, it looks like this:
Try to use an actual regex instead.
text = text.replace(/\u200e/g, '');
can I adjust my regex to match either '2 others' or the same text with the embedded 200e unicode char?
You could just change the
\s in your regex to include U+200E as well, e.g.