how could I get value from regexp?
var str = '<tag>VALUE</tag>'; // VALUE
how could I get value from regexp?
var str = '<tag>VALUE</tag>'; // VALUE
If your string is really that simple, you could simply get rid of the tags:
var str = '<tag>VALUE</tag>';
str = str.replace(/<tag>|<\/tag>/g,'');
If it is actually more complex or variable, then a regex may not be the way to go.
use groups:
var m = /<[^>]+>([^<]*)<\/[^>]+>/.exec('<tag>VALUE</tag>');
var s = m[1]