Archive for the ‘regular expression’ Category

Regular Expression to replace all characters except …

Monday, September 17th, 2007

link.replace(/[^0-9]/g,'')

Extracting the last part of the url

Monday, September 17th, 2007

link.substring(link.lastIndexOf('/')+1,link.lastIndexOf('.'))