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

The single app analytics solutions to take your web and mobile apps to the next level.  Try today!  Brought to you in partnership with CA Technologies

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.

CA App Experience Analytics, a whole new level of visibility. Learn more. Brought to you in partnership with CA Technologies.


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

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


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

{{ parent.tldr }}

{{ parent.urlSource.name }}