How to match asterisk in string, If I remove * from the string in following code It works fine. It gives me list of 7.9. Any solution to make it work with that '*' after multiplier in string.
import re
line = r"multiplier* : 7.9";
reg = re.compile(r'\b(?:multiplier\*?)\b\s*:?\s*(\d+\.?\d*)')
searchObj = re.findall( reg, line )
if searchObj:
print(searchObj)
else:
print("Nothing found!!")