[RESOLVED] preg_replace pattern. need help
I'm trying to figure out how to write the regexp pattern for a text which consists of many values. ex. "1,3,55,7" or "4,2,7,3,6,8,13,33,453". So the amount of values does not matter, and the separator shall be ",".
Change the last "+" to a "*" if you also want to replace a number with no commas, e.g. "53".
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread