Forum Discussion
hooleylist
Mar 30, 2009Cirrostratus
Hi Jeroen,
I think that's about as good as you can get it. You could potentially use a few string commands to find the start of /Beer/now.html in /find/some/*_Server1_*/Beer/now.html, but I think it would be overly complicated.
If you do stick with the regex, you could update the regex to /find/some/.*_[Ss]erver1_.*?/ as .*?/ will match anything up to the first /.
Also, you could get rid of the intermediate variable:
HTTP::redirect "http://www.heineken.nl/want/[regsub {/find/some/.*_[Ss]erver1_.*?/} $uri ""]"
Aaron