In the example below, I want {0} and {1} to be replaced with arguments passed to the format, and {2} should have regex functionality with \w{2}
of, "find two letter characters". How to do it?
q = re.search("{0}\w{2}b{1}\w{2}quarter".format('b', 'a'), search_me).group()
source share