Rahul Rahul - 10 months ago 33
Java Question

How to create a regex expression for alphanumeric which contain 15 or 18 Characters

I wan to create

Regex Expresssion
which accept alphanumeric and should accept only
15 or 18
characters and I am storing the
regex expression
in database.

15 Number Example


18 Number Example



The simple answer would be


Check it out here at regex101.

But you haven't given us much to go on.