I have not been able to find a proper regex to match any string not starting and ending with some condition.
This matches
AS.E
23.5
3.45
This doesn't match
.263
321.
.ASD
The regex can be alpha-numeric character with optional '.' character and it has to be with in range of 2-4(minimum 2 chars & maximum 4 chars).
I was able to create one ->
^[^\.][A-Z|0-9|\.]{2,4}$
but with this I couldn't achieve mask '.' character at the end of regex.
Thanks.
|) inside brackets ([]). You should use a tool to help you build your regex, like regex101.com^(?=.{2,4}$)[A-Z0-9]+\.[A-Z0-9]+$^[A-Z0-9]{1,2}\.[A-Z0-9]{1,2}? I don't get why you need lookahead?^(?=.{2,4}$)[A-Z0-9]+\.?[A-Z0-9]+$. Sam, is that so?