javascript format social security number
function formatSocialSecurity(val){
val = val.replace(/\D/g, '');
val = val.replace(/^(\d{3})/, '$1-');
val = val.replace(/-(\d{2})/, '-$1-');
val = val.replace(/(\d)-(\d{4}).*/, '$1-$2');
return val;
}
formatSocialSecurity("135711458");//"135-71-1458"
Also in JavaScript:
- detect mouse javascript
- get set propoties in angular
- javascript change image src
- create react app with pwa
- how to add links in react js
- jquery dynamic event handling
- convert associative array to json javascript
- look up asciii value javascript
- contact form7 404 wp-json feedback
- react class component
- 'App' is not defined react/jsx-no-undef
- get css value jquery
- scroll to top in react
- load_jsonl
- convert seconds to hours minutes seconds javascript
- js alert yes no
- get decimals from float javascript
- javascript write to file
- javascript page load event
- how to check if 2 images are touching js
- regex char or char
- javascript save data to local storage
- showdown react
- how to start v-for on a specific index