s/(,42|42,)//g;
The problem with this is that a list, by definition, might contain only one element. What if that element is 42?
In reply to Re^2: Howto strip 42 from comma separated list using s///
by Not_a_Number
in thread Howto strip 42 from comma separated list using s///
by ady
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |