0

I don't have a lot of experience with regular expressions, and I'm breaking my head over this one.

I have the following string: (2*8)+(3*3)

I want to retrieve 2*8 and 3*3, but the character between the parentheses can vary,

If i use the following regex: r'\((.*)\)'

I get 2*8)+(3*3

How do I get 2*8 and 3*3?

Ivan Kolesnikov
  • 1,787
  • 1
  • 29
  • 45
Oreborous
  • 322
  • 1
  • 3
  • 14

0 Answers0