Answers for "reverse a string without affecting special characters in javascript"

0

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]
Posted by: Guest on April-27-2021

Code answers related to "reverse a string without affecting special characters in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language