Not in all cases, just whenever the comma is enclosed in parentheses, (\d{4,5}) not (\d){4,5}, works this way with all identifiers. Check out $remove(a(,b,)c,(,b,))