Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why unicode word is not matching but english word will match with my regex

Hi i’m trying to match the any give word if

  1. if it begins with (same letters)
  2. exact match (exact word)

My regex is something like this

/(?<=[(["]\s*|\b)(टीम\w*|UAE\w*|afri\w*)(?=\b|\s*[\])"])/igm

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

which works for english words but fails with hindi words

Note: my expectation is to match both english and hindi

Here is what i have tried Regex101.com

Problem: my pattern is matching english words perfectly but not matching this hindi word टीम

>Solution :

I managed to come up with something:

(?<=[(["\s]|^)(टीम|UAE|afri)[^\]\s)"]*

Please tell me if there are cases missed.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading