I have the following piece of code
$j('#singleDeviceMac').val().replace("/:/","");
this piece of code is written to remove all the colon in a string which reads as follows:
00:04:F2:1C:AC:27
However it does not seem to work.. please help!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It probably needs to be global to remove all of them:
And since it’s a regex it should be unquoted.
FIDDLE