Remove Commas from Numbers and Leave Commas between Words
I need to remove commas from numbers and leave commas between words, but I can’t find regular expression that does this. Numbers are always same without whitespace characters, but text can be different (with whitespace characters on both side, on left, on right side of comma, or without white spaces) like:
tree , four
Can please somebody help me with this.
preg_replace('@(\d),(\d)@', '$1$2', $string);
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)