I am trying to use python's re to match a certain format.
import re
a = "y:=select(R,(time>50)and(qty<10))"
b = re.search("=.+\(",a).group(0)
print(b)
I actually want to select this portion"=select("from string a. but the code I have made outputs the answer as =select(R,(time>50)and(. I tried re.findall, but this too returns the same output. It does not notice the first match and only outputs the final match. Anywhere I'm going wrong? Your Help is greatly appreciated. I basically want to find the function name, in this case select. The strategy is used was appears after = and before (.