LoginSignup
0
0

More than 1 year has passed since last update.

javascriptでの正規表現 置き換え

Posted at

■経緯

簡単なのに、ちょっとはまるし忘れるので。

■文法

/ 正規表現/g;
→デリミタ 正規表現 デリミタ gオプション;

■サンプル

// 不要文字列(" \)削除
const regex = /(\"|\\)/g;
const replacedUrl = str.replace(regex, '');
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0