On Dreamweaver if I write on a Javascript document some text between two slashes like
You can use regular expression literals like this:
var pattern = /([0-9]+)/;
if(pattern.test(someString)) {
// ...
} else {
// ...
}
See also: https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Regular_Expressions
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.
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