So am trying to do a basic bbcode parsing (just for embed tag) but it’s been a while I didn’t play around with regexp so I’m asking help on this one.
I’d like to match all ... so I use:
var regexp = new RegExp(/\.*\[\/embed\]/ig);
console.log(regexp.test(content));
I got many false while I should only have true.
Jsfiddle available here : http://jsfiddle.net/5rxu5/3/
This should work:
Here is the jsfiddle link which alerts true for all cases: http://jsfiddle.net/UVy45/