We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
match = re.findall(r'(?<=['+consonants+'])(['+vowels+']{2,})(?=['+consonants+'])',raw_input(),flags = re.I)
'
Can someone kindly explain to me the use/meaning of the '?<=' and '?=' in the above snippet (from the editorial) in detail. Also,in re does ['+xyz+'] always get replaced by the string in xyz or it happens only when we use the '?' thingys?
What is meant by positive/negative lookahead/lookbehind?
I did google and refer the python documentation but couldn't understand about the '?' thingys nor could I find any concise explanation of the lookahead/lookbehind stuff.
HELP! :P
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Re.findall() & Re.finditer()
You are viewing a single comment's thread. Return to all comments →