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 match only two group

enter image description here

I want to receive in example regex match only 17 and 20 (skip 3 match only two match)

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

>Solution :

Depending on what you want to do, this one can be a good solution

[0-9]{2}(?!$)

It matches the groups of 2 digits not at the end of a line !

You can also try : ([0-9]{2})\s[A-z]+\s([0-9]{2}) if you want only 2 groups

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