I want a regex of length 13 in which starting word is a alphabet and rest 12 entries are digit. Something like this : A123456789764

  • hello @suragr have tried my answer? – Himanshu Jan 5 '19 at 5:58

You can use this pattern [a-fA-F]{1}[0-9]{12} to match your scenario.

You can get idea from tutorialpoints and this stack question about how regexp is work.
for php you can check this also.

For live editor you can use regexp live

Hope it will be helpful.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.