method that parses string for URL and last quote