I need to extract URL from a text using jquery.
Lets say i have sowhere on the page following textarea code
how about this
$(document).ready(function() {
$('#click').click(function(){
var one = document.getElementById('one');
one.value.match(/url ={([^}]*)}/,"");
alert( RegExp.$1);
})
})
or a runnable demo http://jsfiddle.net/PePS7/10/
oops, bit late to the game but ammended the example and the jsfiddle to only show the url