I just started using python and I need help with a pattern match. m = re.match("(.{30})(word)(.{30})",paragraph); I need to match 30 characters on each side of word. The problem word is getting treated as a string not a variable like I need it to. How can I make it treat word as a variable ?