javascript - regex for getting text inside [bbcode] -


how text inside custom bbcode,

[gallery] text [/gallery]. 

i using regex wont work

/^(.*)\[gallery.*?\[\/gallery\](.*)$/gmi 

(new) try :

/\[gallery\](.*)\[\/gallery\]/g  

to return value use

var result = str.match(regex); alert(result[1]); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -