I need a regex to match this pattern:
- A string 13 characters long
- The first letter must be a L, H, or B (not case sensitive)
- The next 12 characters must be in the range 0-9
e.g. L109878762013 will match while L10/987876/2013 won’t
If the pattern doesn’t match any of the above criteria, and isn’t 13 characters long then it shouldn’t be picked up.
What do I need to modify in the regex [LHB][0-9]{12} to make it work?
Should work if you expand the
{12}, which SQL server does not support: