string output =3;#Paul, John;2;#Rajamanickam, Gowtham;
i want to remove the 3;# and 2;#
my output =Paul, John;Rajamanickam, Gowtham;
anyone help to remove the characters from the string using javascript.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Saroj Kumar SahuPosted May 7, 2015, 5:29 AM
You can use 'replace' method in javascript.
Ex:
//Declare your string
var output = '3;#Paul, John;2;#Rajamanickam, Gowtham;';
//string to be replaced
var pattren = /[0-9];#/g;
//use replace method
var result = output.replace(pattren, '');
Hope this will help you.