Tag «RegEx»

How to validate date using Java regular expression

My earlier post on how to validate email address, SSN and phone number validation using Java regex still attracts a lot of visitors. Today I realized that another piece of data that many programmers need to validate is the date. Many Java applications have to process input date values, so I thought it will be …

Ultimate Java Regular Expression to validate any email address.

My post about Java regular expression gets a lot of hits daily. Someone commented that the regular expression I included in that post does not block certain invalid email addresses. So I updated the Java regular expression to validate email address. I am pretty sure that the following Java regular expression will validate any email …

Edit and Test Regular expressions online using RegExr.

Regular expressions provide a powerful and flexible way to search for phrases or characters but they are also confusing and many developers find them quite daunting. If you have been reluctant to learn regular expressions because of their apparent complexity, fear no more.

Validate U.S Phone Numbers using JavaScript Regular expression.

Photo credit: aussiegall Continuing with our JavaScript regular expression series today we will discuss JavaScript regular expression to validate U.S phone number. Previously we talked about validating email , Social Security number and zip code using JS regex. In today’s post I’ll show you how to use JavaScript regular expression to validate U.S phone number. …

Validate Zip code using JavaScript Regular expression

Zip Code

Continuing with my series of JavaScript regular expression today we will see how easy it is to validate zip code using regular expression in JavaScript. Previously we talked about validating email and Social Security number using JS regex. In today’s post I’ll show you how to use JavaScript regular expression to validate zip code. Let …