Java Regular Expression to Validate Social Security Number (SSN)
Here is a utility method to check if a given String is a valid Social Security number using Java Regular Expression.
Here is a utility method to check if a given String is a valid Social Security number using Java Regular Expression.
Here is another method from my String utility class. This method uses a regular expression to check if a String is a numeric value. Look at the code, then read through the explanation that follows
Here is a simple Javascript function to validate a date in US format.
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 […]
An example on how to validate if a String variable in Java has all numeric digits.
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 […]
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.
Image credit: aussiegall Continuing with our JavaScript regular expression series today we will discuss JavaScript regular expression to validate U.S phone numbers. Previously we talked about validating email, Social Security number, and zip code using JS regex. I’ll show you how to use regular JavaScript expressions to validate U.S. phone numbers in today’s post. Although […]
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 […]
Regular Expressions offer a concise and powerful search-and-replace mechanism. They are patterns of characters used to perform a search, extract or replace operations on the given text. Regular expressions can also be used to validate that the input conforms to a given format. For example, we can use Regular Expression to check whether the user […]