tags:

views:

38

answers:

1
    function cleanURL($string)
{
    $url = str_replace("'", '', $string);
    $url = str_replace('%20', ' ', $url);
    $url = preg_replace('~[^\\pL0-9_]+~u', '-', $url); 
    $url = trim($url, "-");
    $url = strtolower($url);
    $url = preg_replace('~[^-a-z0-9_]+~', '', $url); 
    return $url;
}

$regex=cleanURL("$title");

how to convert that code into asp classic? thank you.

A: 
Function cleanURL(string)
url=Replace(string,"'", '' )
url=Replace('%20', ' ', url )
url=trim(url, "-");
url=LCase(url)
cleanURL url
End Function

I think it need to amend

andesign