I need a reg exp that will parse something like-
"2 * 240pin"
where the * can be either the regular star or unicode char \u00d7 or just an x. This is what I have but its not working:
multiple= r'^(\d+)\s?x|*|\\u00d7\s?(\d+)(\w{2,4})$'
multiplepat= re.compile(multiple, re.I)
print multiplepat.search(u'1 X 240pin').groups()
returns
multiplepat= re.compile(multiple, re.I)
File "C:\Python26\lib\re.py", line 188, in compile
return _compile(pattern, flags)
File "C:\Python26\lib\re.py", line 243, in _compile
raise error, v # invalid expression
error: nothing to repeat