Please help me construct a regex to match:
some text(x, x, x, x)
where x can be any integer either positive or negative.
I need it to match exactly as it is shown above. Each x can be a different positive or negative integer.
Please help me construct a regex to match:
some text(x, x, x, x)
where x can be any integer either positive or negative.
I need it to match exactly as it is shown above. Each x can be a different positive or negative integer.
that exactly would be /text((-?\d+,?){,3})/
or more generally /^\w+((-?\d+,?)+)/