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.
ASCII/Unicode番号以外のすべてを置き換えるにはどうすればよいですか:
ASCII 0-9 ユニコード: ٠-٩
PHP::RegEx を使用して、必要なコードはありますか?
前もって感謝します。
\P{Nd}「10進数以外の任意の文字」を指定するために使用できます。
\P{Nd}
preg_replace('/\P{Nd}/u', '', $s)
$ret = preg_replace('/[^\d]/', '', $str);