I want to find words that appear after a keyword (specified and searched by me) and print out the result. I know that i am suppose to use regex to do it, and i tried it out
Your example will not work, but as I understand the idea:
regexp = re.compile("name(.*)$") print regexp.search(s).group(1) # prints " is ryan, and i am new to python and would like to learn more"
This will print all after "name" and till end of the line.