I have this code in javascript
var pts = "0 0, 0 1909, 2559 1909, 2559 0";
pts.replace(/0/g, '2');
The problem is that it replaces all zeros! And I want just the stand alone zeros to be replaced, how can I achieve that?
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.
There exists “\b” which marks a wordboundary!