Tag Archives: Regular expression

Regular Expression is the combination of the some specific keywords and symbols that indicate the specific pattern for finding and replacing patterns of text. You can use the regular expression to search particular characters, words, or patterns of characters in the string.
  
See the example:
validating phone numbers in net
Remove invalid characters from string
Find and replace one date format to another
 
External Links:
MSDN

Regular expression to check the currency upto 2 digit in JavaScript

  Regular expression to check the currency upto 2 digit in JavaScript such as 34, 45.45, 567.45 etc. <html> <head> <script type="text/javascript"> var reg = /^\d+(\.\d\d)?$/; function CurrencyValidation(Currency) { var OK = reg.exec(Currency.value); if (!OK) window.alert("Currency isn’t valid"); else window.alert("Currency is valid"); } </script> </head>   <body> <p>Enter your Currency up to two decimal numbers … Continue reading Regular expression to check the currency upto 2 digit in JavaScript

Regular expression for password validation in JavaScript

  Following example show that how we can validate password with the help of Regular Expression that have these validation: Must be at least 10 characters Must contain at least one one lower case letter, one upper case letter, one digit and one special character Valid special characters are – @#$%^&+= <html> <head> <script type="text/javascript"> … Continue reading Regular expression for password validation in JavaScript