Posts

Showing posts with the label number

Using Regex to validate E mail and Phone Number

Using Regex to validate E mail and Phone Number Here is the RegEx  expression to validate Phone number and E-mail. RegEx  expression for validating E-mail : /^(([^<>()[].,;:s@"]+(.[^<>()[].,;:s@"]+)*)|(".+"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/ and the  RegEx  expression for validating Phone number : /^(?([0-9]{3}))?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/ Here is an example of usage of these RegEx  expressions in JavaScript . var emailregex=/^(([^<>()[].,;:s@"]+(.[^<>()[].,;:s@"]+)*)|(".+"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/; var phoneregex=/^(?([0-9]{3}))?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/; if (emailregex.test( string )){ // valid email }else{ // Invalid email } if (phoneregex.test( string )){ // valid phone number }else{ // Invalid phone number } You can replace string with whatever you want. For Example: if (phoneregex.test($(...

Video Computer Number Systems Binary Octal Hexa Decimal Basics Conversion Techniques 7 Golden Rules

Image
Video Computer Number Systems Binary Octal Hexa Decimal Basics Conversion Techniques 7 Golden Rules This video shows you How To Convert from any base Number System to any other base number system without the help of calculator! Including the fraction conversion,also tell you 7 Golden Rules needed for those conversions. See the details description below. Topics covered- 1. Basics of 4 types of number systems(Decimal,Binary,Octal,Hexadecimal�) 2. Decimal to Other Number Systems Conversions i) Decimal to Binary Conversion ii) Shortcut (Weighted Method) conversion for Decimal to Binary iii) Decimal to Octal Conversion iv) Decimal to Hexadecimal Conversion v) Golden Rule #1 3. Back To Decimal Conversion i) Binary To Decimal Conversion ii) Octal To Decimal Conversion iii) Hexadecimal to Decimal Conversion iv) Golden Rule #2 4. Converting With The Fractions i) Decimal Fraction to Binary Fraction ii) Decimal Fraction to Octal Fraction iii) Golden Rule #3 5. From Other Bases Fraction to Back To...