Over a million developers have joined DZone.

Java Regular Expressions to Validate Credit Cards

DZone's Guide to

Java Regular Expressions to Validate Credit Cards

· Java Zone
Free Resource

Just released, a free O’Reilly book on Reactive Microsystems: The Evolution of Microservices at Scale. Brought to you in partnership with Lightbend.

Visa Card


Amex Card


Carte Blanche Card


Diners Club Card


Discover Card


JCB Card


Visa Master Card


Insta Payment Card


Laser Card


Maestro Card


Solo Card


Switch Card


Union Pay Card






As you can see, regular expressions are incredibly powerful and the above examples are very basic. Regular expressions are essential for all sorts of application from web scraping, form validation and pattern matching.

Hopefully you will find this resource useful and would come back to refer again and again.

Strategies and techniques for building scalable and resilient microservices to refactor a monolithic application step-by-step, a free O'Reilly book. Brought to you in partnership with Lightbend.


Published at DZone with permission of Jagadeesh Motamarri, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}