javascript - Figuring out Regex pattern -


i still not when comes writing regex patterns , having issues trying figure out search pattern following string:

{embed_video('rpcf9eyxzpzfbhy2tfrkloquwuzj','575','352','video_player')}

i need search page in between hash {} marks.

i have tried this:

string = $(".content").text(); string.match("^{[\w-]}"); 

but not working... ideas on doing wrong?

thanks everybody! did make work:

$("div", "html, body").each(function(){         var text = $(this).text();          if(text.match("^\{.*\}$")) {             console.log("found");         }     }) 

if using eclipse chance, there regular expression plugin can play around , see how regular expression searches text.

i try this

string.match("^\{.*\}$"); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -