In the most simple case, the pattern would be \(.+?\)
but what do I do if I have a string like that (a, b=[0, 1, 2], c=(0,), d=(1, 2, 3))
? I need to make it a, b=[0, 1, 2], c=(0,), d=(1, 2, 3)
.
Asked
Active
Viewed 36 times
0

Foobard
- 70
- 1
- 8
-
you just want to remove the outermost parenthesis ? – marvel308 Sep 05 '17 at 08:10
-
yep, that would be enough. Is it possible? – Foobard Sep 05 '17 at 08:14
-
1https://regex101.com/r/hR8B0w/1 – marvel308 Sep 05 '17 at 08:20
-
@marvel308 aaah I can't believe I couldn't figure it out...I must be too tired...well if you want you can post it as the answer. Thank you! – Foobard Sep 05 '17 at 08:31
-
The question is marked as a duplicate, so can't – marvel308 Sep 05 '17 at 08:32
-
@marvel308 well, so do I have to delete it? – Foobard Sep 05 '17 at 10:47