Try
var str="The *rain in SPAIN* stays mainly in the plain";
var patt1=/\*.*\*/;
console.log(str.match(patt1));
The \* means the literal "*" character. Then the . means any character and * means any number of times, so .* means "any number of characters".
Optional bonus:
The code above should work fine, but you'll notice that it matches greedily. So with input abcd*efgh*ijkl*mnop, the output will be *efgh*ijkl*, whereas you might have preferred the non-greedy match *efgh*.
To do this, use
var patt1=/\*.*?\*/;
The ? operator indicates non-greediness and ensures the least number of characters possible to get to the next \* are eaten, whereas without the ?, the most characters possible to get to the next \* are eaten.
To learn more I recommend http://www.regular-expressions.info/repeat.html . In particular read the "laziness instead of greediness" part.