Quantcast
Channel: BlogoSfera » comma
Viewing all articles
Browse latest Browse all 12

Regular expression removing 000 and retaining numbers, minus and comma

$
0
0

I have a string like follows in javascript- var input="-213,23.3 '000 Millions"; I want the output to be “-213,23.3” I am using following regex to achieve this- input.replace(/[^0-9.,'-]/g, "") But I am getting output “-213,23.3’000” I want to remove ‘000 also(as I this is a representation of thousand) Can anybody please tell me how to […]

The post Regular expression removing 000 and retaining numbers, minus and comma appeared first on BlogoSfera.


Viewing all articles
Browse latest Browse all 12

Trending Articles