Quantcast
Channel: CodeProject Latest postings for Regular Expressions
Viewing all articles
Browse latest Browse all 224

Regex with condition? Should be easy

$
0
0
Hello,

I have not worked. 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 items because the logic to NOT capture is:
Start with 1 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 OR a single letter and a single digit. In other word, if it does finish with 1 letter only OR 1 letter and 1 digit, I do not want to return it

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

Viewing all articles
Browse latest Browse all 224

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>