
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Sanitize string of regex characters before RegExp build?
I want to use a string to perform a global regex, but it might have regex characters in it. What'... I want to use a string to perform a global regex, but it might have regex characters in it. What's the best way to escape all regex characters in a string before building a regex with it? Basically I might have something like this; var test = 'test.'; var regex = new RegExp(test, 'ig'); I need 'test.' to become 'test\.' so it doesn't behave in unexpected ways.
2015/09/04 リンク