I am currently trying to learn how to use regular expressions so pelase bear with my simple question. For example, say I have an input file containing a bunch of links separated by a newline:
www.foo.com/Archives/monkeys.htm
Description of Monkey's website.www.foo.com/Archives/pigs.txt
Description of Pig's website.www.foo.com/Archives/kitty.txt
Description of Kitty's website.www.foo.com/Archives/apple.htm
Description of Apple's website.
If I wanted to get one website along with its description, this regex seems to work on a testing tool: .*www.*\\s.*Pig.*
However, when I try running it within my code it doesn't seem to work. Is this expression correct? I tried replacing "\s" with "\n" and it doesn't seem to work still.