c# - Extract Url from Javascript in -


i new in regex can please in writing regex in c# extract url text below?

example 1

x+=1; top.location.href = "http://www.keenthemes.com/preview/index.php?theme=metronic"; 

example 2

alert("are sure");      top.location.href   = 'http://www.keenthemes.com/preview/index.php?theme=metronic'; 

if url starts http://, 1 should it:

["'](http.*)["'] 

the url stored in second group (groups[1].value) of match object


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -