In javascript I need to get the text within the custom tag. For example
[tag_retweet attr=”val” attr2=”val”]
In this case I need to get the word “retweet” only skipping all other texts and another example is,
[tag_share]
Here I need to get the word “share”.
So what will be the regexp for getting that tag name in my case ??
Something like
/\[tag_([a-z0-9_]+)(?:\s+|\])/