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

Regex for matching a word with two ore more capital letters li

I’m trying to filter out words with multiple capital letters in cyrillic like in this example in google sheets:

ПредметыПапкиВзаимодействий

I’ve tried this one: \w*[А-Я]\w*[А–Я]\w

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

But it’s only showing acronyms like ЭДО, ЕГАИС, etc.

Could you suggest any solutions?

>Solution :

You can use

[А-ЯЁ][^А-ЯЁ]*[А-ЯЁ]

Or, if there can/should be no whitespaces between two capital letters you can use

[А-ЯЁ][^А-ЯЁ\s]*[А-ЯЁ]

Details:

  • [А-ЯЁ] – uppercase Russian letters
  • [^А-ЯЁ\s]* – any zero or more chars other than Russian uppercase letters and whitespace
  • [А-ЯЁ] – uppercase Russian letters
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