reverse a string without affecting special characters in javascript
var stringIn = '[email protected]';
var rev = stringIn.replace(/[a-z]+/gi, function(s){return s.split('').reverse().join('')});
document.write(rev); // [email protected]
Are there any code examples left?
New code examples in category Javascript