Say I have a string like this: "1,2,3,11"
A simple regex like this will find a number in the string: (?<=^|,)1(?=,|$) - this will correctly find the "1" (ie. not the first "1" in "11").
However, to remove a number from the string, leaving the string properly formatted with commas in between each number, I need to include one adjacent comma only. For example, matching 1,, 2, or ,11.
So the trick is to match one comma, on either side of the number, but to ignore the comma on the opposite side (if there is one). Can someone help me with this?