I\'m trying to execute this code :
import re
pattern = r\"(\\w+)\\*([\\w\\s]+)*/$\"
re_compiled = re.compile(pattern)
results = re_compiled.search(\'COPRO*H
Looks like it might be something in your pattern. I'm not sure what you are trying to do with the last '*' in your expression. The following code seems to work for me:
import re
pattern = r"(\w+)\*([\w\s]+)$"
re_compiled = re.compile(pattern)
results = re_compiled.search('COPRO*HORIZON 2000 HOR')
print(results.groups())