from the below set of rows i need
from below records..
OJH,
WV],
2V,
W.W,
V,
@A,
AL,
AS,
1234,
1,
23
i need to select OJH,WV],2V,W.W,V,@A etc..
ie, combination of letters and special characters,combination of letters and numbers and letters or digits combination greater than 3
i need to skip AL,AS,1234,1,23 etc..
If I understand you correctly, this should do it:
^(?=.*[A-Z])(?=.*\d).*$|^(?=.*[@\].])(?=.*\d).*$|^(?=.*[@\].])(?=.*[A-Z]).*$
Using positive look-ahead it checks for lines containing
@
, ]
and .
counts as special)Check this example at regex101.
This assumes the combinations are tested one by one - no commas.
Regards.
Edit
Missed the wrong number of letters option. This should do it:
^(?=.*[A-Z])(?=.*\d).*$|^(?=.*[@\].])(?=.*\d).*$|^(?=.*[@\].])(?=.*[A-Z]).*$|^[A-Z]$|^[A-Z]{3,}$