Mar-06-2019, 11:53 AM
What's the most elegant solution for checking a string format where I need to match a single alpha then 3 numerics?
examples:
p130 is good.
130p is bad.
pg130 is bad.
p13 is bad.
p3p is bad.
So in this case I need 1 alpha and 3 numerics. Although a solution that was easily configurable would be good.
I could do this with a load of 'if in' checks, but there must be a better answer.
Many thanks.
examples:
p130 is good.
130p is bad.
pg130 is bad.
p13 is bad.
p3p is bad.
So in this case I need 1 alpha and 3 numerics. Although a solution that was easily configurable would be good.
I could do this with a load of 'if in' checks, but there must be a better answer.
Many thanks.