Matching a Forward Slash with a regex
You can escape it like this.
/\//ig; // Matches /
or just use indexOf
if(str.indexOf("/") > -1)
You need to escape the /
with a \
.
/\//ig // matches /
You can escape it like this.
/\//ig; // Matches /
or just use indexOf
if(str.indexOf("/") > -1)
You need to escape the /
with a \
.
/\//ig // matches /