J
Jozef Jarosciak
Hi everyone,
I am building a web crawler and one of the features which I need to
include is exclusion of specified 'variable + value' from the url.
Example, user wanted to extract variable "s":
So when you look at this url:
"http://www.goldenretrieverforum.com/search.php?s=5817617a59fb630a7f40846e4a29efc1&do=getdaily"
, it has a variable 's' and its value, plus some other variables.
I need a code which would shorten that url to this:
"http://www.goldenretrieverforum.com/search.php?do=getdaily"
, extracting variable 's' completely.
But it needs to be smart to such point, that is variable 's' is the
last variable in the link, like this:
"http://www.goldenretrieverforum.com/search.php?s=5817617a59fb630a7f40846e4a29efc1"
, it would correctly fix it to:
"http://www.goldenretrieverforum.com/search.php"
Can someone help me write REGEX or point me to site which has such
regex written already?
Or is there any other way to do this?
Thanks a lot for your time and help.
Joe
I am building a web crawler and one of the features which I need to
include is exclusion of specified 'variable + value' from the url.
Example, user wanted to extract variable "s":
So when you look at this url:
"http://www.goldenretrieverforum.com/search.php?s=5817617a59fb630a7f40846e4a29efc1&do=getdaily"
, it has a variable 's' and its value, plus some other variables.
I need a code which would shorten that url to this:
"http://www.goldenretrieverforum.com/search.php?do=getdaily"
, extracting variable 's' completely.
But it needs to be smart to such point, that is variable 's' is the
last variable in the link, like this:
"http://www.goldenretrieverforum.com/search.php?s=5817617a59fb630a7f40846e4a29efc1"
, it would correctly fix it to:
"http://www.goldenretrieverforum.com/search.php"
Can someone help me write REGEX or point me to site which has such
regex written already?
Or is there any other way to do this?
Thanks a lot for your time and help.
Joe