Tuesday, 27 August 2013

Parsing url from txt file

Parsing url from txt file

I am trying to parse a txt file which looks like this:
Disallow: /cyberworld/map/ # This is an infinite virtual URL space
Disallow: /tmp/ # these will soon disappear
Disallow: /foo.html
I need to read the file and extract the part with the url after 'Disallow'
but also ignoring the comments. Thanks in advance.

No comments:

Post a Comment