On 24/11/11 08:14, rubix Rubix wrote:
> Hi,
>
> I have a set of urls that I want to normalize but I can't find a regex
> to do that, this is an url sample:
> http://www.example.com/index.php?/topic/something/page__st__20__s__99590dc581fe8e7386051d6dfgdfg4eca4c/
> when I use a web browser I find that this url is equivalent of the
> following:
> http://www.example.com/index.php?/topic/something/page__st__20
> It is clear that the last part is a checksum but how can I detect that
> automatically
>
>
> best regards
>
Can you work with something like this?

url_re = /^http:\/\/.*((?<=__s__)[a-g0-9]{32,64})\/$/

I've assumed your checksum is between 32 and 64 characters which may or 
may not be correct.

Sam