Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私が試したら
escape('/')
同じものを返すだけです。「/」をエスケープできる関数はありますか?
あなたはそれをurlencodeしたいということだと思います。試す encodeURIComponent('/');
encodeURIComponent('/');
または、これが正規表現で使用されている場合は、プレフィックスを付けることもできます\。
\
foo.test(/\black\/white/) // foo = 'black/white'