0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

javascript 初心者まとめ replaceと正規表現

Last updated at Posted at 2019-09-03

初心者のため間違っている表現があるかもしれません。
忘備録として記載します。

文字を置換する時にうまくいかないと思ったらどうやら正規表現というのがあるらしい。

replace(/\s/g,"/")

// 空白を"/"に置き換える
//  \s 空白文字
// g グローバルマッチ(文字の最後まで)
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?