I need a regex for combination of numbers and uppercase letters and maybe lowercase letters and /,- characters, which contains at least 4 characters.
But of course it should contain at least 2 uppercase letter or one number.
I tried this:
barcode_regex = r"(?=(?:.+[A-Z]))(?=(?:.+[0-9]))([a-zA-Z0-9/-]{4,})"
For example match such cases as follows:
ametFXUT0
G197-6STK
adipiscXWWFHH
A654/9023847
HYJ/54GFJ
hgdy67h