Share via

Search with condition

Personne Personne 1 Reputation point
2022-02-21T15:40:35.053+00:00

Hello,

I have not work with regex for a long time, and I m sure I forgot something simple

In the list below

12334p4p
2345stk
5643stk43
1234db43
1234a1
1234a

I want to capture the first 4 because the logic is
Start with1 to 8 digits
Should have 1 to 3 letters AND 2 or more digit again

I do not want to get the 2 last entries because it finishes with a single letter at the end or a single letter and a single digit. In other word, if it does finish with 1 letter OR 1 letter and 1 digit, I do not want to return it

Thank you guys, I'm sure this one is easy !

Community Center | Not monitored

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.