Some useful Javascript/PHP regualar expressions

Regular expression: one of the most useful tool get rusted regularly due to lack of regular use and application.
I hereby list some of the most useful regular expression so that the validation process becomes easier and also be helpful for future works too.
- Match Phone-number
- Regex :: /^+?[ds-]{5,25}$/
This regex matches almost all phone numbers with:
- Optional Plus (+) sign at the very first position
- Optional Spaces (s) and hyphen characters (-) in between the numbers
- Any digits
- All of the above should count not less than 5 and not more than 25 - Regex :: /^+?[ds-]{3,25}[d]{2,}$/
The regex require one more criteria that the phone-number (string) should end with at least two continuous digits.
This means +977-984-1123456 or +977 984 1234-56 is supported but +977-9841123456- (hyphen or space at ending) are not supported.