I have a string in the following form :
"425x344"
Now I'd like to resolve first and second numbers from this string as two separate variables. How can I do this ? I've created this regex:
regex = re.compile(r"^(\d+x\d+)")
to check if the string form is proper. But what next ?
...$and.match(or^...$and.search) to make sure the whole sting is consumed. As of now, both ways of running the regex accept1x1foo.$will accept1x1\n