campinam
asked on
Convert regex to regexp
In .Net the regex (?<=>[^<]*?)\bă works as expected (find words that start with ă and are not located within a tag).
But in JavaScript Chrome \b won't work with Unicode texts.
What would be the correct equivalent in JavaScript for the above .Net expression?
(I am referring to the latest versions of regex/regexp)
But in JavaScript Chrome \b won't work with Unicode texts.
What would be the correct equivalent in JavaScript for the above .Net expression?
(I am referring to the latest versions of regex/regexp)
I'm surprised it works in .Net
I think this should work:
\W is a non-word (non-letter, non-number) character.
(?<=>[^<]*?\W)ă
\W is a non-word (non-letter, non-number) character.
ASKER
\W is a non-word, but an ASCII construct n JavaScript. It matches non-ASCII letters as well, even with the u flag. So it won't do.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.