Meaning of javascript text between two slashes
Solution 1:
It is the regular expression literal.
From w3schools:
var patt=new RegExp(pattern,modifiers);
or more simply:
var patt=/pattern/modifiers;
And from MDN:
RegExp(pattern [, flags])
/pattern/flags
Solution 2:
It's a RegExp literal. I recommend doing your own research on the topic. I could write an introduction to finite automata and regular languages, but you'd always be able to find a better introduction with a little searching.