Provide thousands of free JavaScript code examples, DHTML, HTML JavaScript Tutorials, Reference and Help. JavaScriptBank.com is the best JavaScript resources
Over 2000+ free Javascript at JavaScriptBank.com Website
if (domainName.match(/\.com$|\.net$|\.us$|\.co\.uk$/i)) { return(true); } else { return(false); }
Note: In the context of this demonstration the term 'white space' includes any non-printing character, that is any character you cannot see. Examples include blank spaces, carriage returns, line feeds, tab characters, etc.
RegExp: A regular expression object contains the pattern of a regular expression. It has properties and methods for using that regular expression to find and replace matches in strings or to match patterns in strings. JavaScript RegExp can be used in the following JavaScript String Methods: string.match(), string.search(), string.replace() and string.split().