Dear Experts,
Given the example URL below, how can it be cleaned up to look like the result below:
http://mashable.com/2011/12/05/alicia-keys-tumblr/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Mashable+(Mashable)
Should be cleaned up to look like:
http://mashable.com/2011/12/05/alicia-keys-tumblr/
This “clean up” routine should ideally handle any type of URL from any site, however the general rule is that the feedburner strings show up ALWAYS at the end of the original URL often starting as “?utm_source …”
Another example URL is below:
http://www.intomobile.com/2011/12/05/dell-kills-streak-7-steps-back-android-tablets/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+IntoMobile+(IntoMobile)
Thank you.
Ended up using this solution
if pageURL contains "?utm" then
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to "?utm"
set pageURL to text item 1 of pageURL
set AppleScript's text item delimiters to oldDelims
end if