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 1 year has passed since last update.

PHPでハイフン(マイナス)に似た文字を統一する

Posted at

必要に応じて配列は増減させること

str_replace([
    "\u{02D7}",
    "\u{1173}",
    "\u{1B78}",
    "\u{2010}",
    "\u{2011}",
    "\u{2012}",
    "\u{2013}",
    "\u{2014}",
    "\u{2015}",
    "\u{2043}",
    "\u{207B}",
    "\u{2212}",
    "\u{25AC}",
    "\u{2500}",
    "\u{2501}",
    "\u{2796}",
    "\u{30FC}",
    "\u{3161}",
    "\u{FE58}",
    "\u{FE63}",
    "\u{FF0D}",
    "\u{FF70}",
    "\u{10110}",
    "\u{10191}",
], '-', $value);
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?