I am searching through a string and am returning matches that are at least n characters long and start with "hi" and end with "bye".
Let's say n = 10
and str = "himalayashibye"
.
I would like to do:
stringFinder = re.findall("hi.{n-5}*bye",str)
(I am subtracting 5 from n because hi and bye already make up five out of n characters.)
However, this does not seem to work.
Any suggestions?