I have this string:
field = 1400 x 3524
I want to take these numbers into two seperate variables so I can perform multiplication. This is how I do it:
num1 = re.match("(\d{3,4})(?= x)", field).group(1)
num2 = re.match("(?<=x )(\d{3,4})", field).group(1)
I works with the first number, but the second number comes out as a NoneType
.
What am I doing wrong?