If I have something a string that looks like “TEST(10,20,30)” how would I be able to pull just the 10 out of this string.
I have tried
/\(([^\)]+)\)/
and that gets the inside of the parenthesis, but when I trie to add in a comma e.g.
/\(([^\),]+)\)/
then nothing matches.
That is because you need to tell the regex to match the stuff between your comma and the closing bracket, too (or leave it out):
or
As you can see you also don’t need to escape parentheses inside character classes.