Regex Custom Creation

Asked

Viewed 76 times

1

Hello,

I know very little about regex and need to create one that validates the result of a Barcode, I’ve used several sites, but since I have no knowledge I can not do, someone knows how to create a regex to validate the structure below.

structure FKDOC000000000000 Always starts with Uppercase FKDOC and must contain 16 digits

Thank you

  • 1

    16 digits in total? or 16 digits after the FKDOC?

  • 1

    I recommend using the lymas tools to test its regex, it also has several useful examples

1 answer

4


You can use that expression: ^FKDOC\d{16}$. Means it will capture at the beginning of the string by FKDOC followed by 16 digits (0-9).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.