Function to parse string as url vars