I'm very new to regex and I need to read in from a text file and find a word after a particular word + characters. For example, the content of the text file is:
Weather now : Mildly-sunny34 Weather tomorrow : Cloudy
I want to extract "Mildly-sunny34"
after searching for the keyword "Weather now"
from the text doc. I want to make sure I do not also get ":"
or " "
spaces apart from the word "Mildly-sunny34"
.
Any help with some explanation is much appreciated. Thanks!