Possible Duplicate:
How to use several string arguments in Python
In the code below I'm trying to search for the one of the following patterns
- href="any characters with one hypen in between except ?"
- href="any characters with one hypen in between and if any other hypen, comes after ? "
I'm having problem where a variable must be inserted within regular expression twice.
Code:
mlink=re.findall('href="(%s+/[a-zA-Z0-9]+-[a-zA-Z0-9?=]+)"|href="(%s+/[a-zA-Z0-9]+-[a-zA-Z0-9]+[?]+[a-zA-Z0-9-]*)"' % path,contents)
Also,
I'm getting not enough arguments for format string
error..