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

Combination of 5 or 6 letters and digits

I have this text:

Lorem ipsum dolor AA99BC sit amet, consectetur adipiscing elit,
sed do eiusmod 3FGF44 tempor incididunt ut labore et dolore magna
aliqua. NLGG21 Ut enim ad

I want to get only the bold marked strings. The conditions are:

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

  1. String should contain 6 or 7 characters in total
  2. String should contain only letters and digits
  3. All letters and digits are allowed

Language used is PCRE syntax in Feature Manipulation Engine (FME). FME is based upon Python.
https://perldoc.perl.org/perlre

Could you help me out with this?

>Solution :

This pattern should match as expected:

\b(?=\w*\d+\w*)\w{6,7}\b
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