Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reverse a string without affecting special characters in javascript

var stringIn = 'name@gmail.com';
var rev = stringIn.replace(/[a-z]+/gi, function(s){return s.split('').reverse().join('')});
document.write(rev); // eman@liamg.moc
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reverse #string #affecting #special #characters #javascript
ADD COMMENT
Topic
Name
8+1 =