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.
\p{Alnum}Ruby言語の正規表現のクラスは何ですか?どんなキャラクターが含まれていますか、そしてそれはどのように違います[:alnum:]か?
\p{Alnum}
[:alnum:]
rdocとこのチュートリアルに基づくと、2 つの式は同等です。
アルファベットと数字が含まれています。ASCII 文字のみを使用する場合は、[a-zA-Z0-9]. ASCII 以外の文字がある場合は、 と の両方[:alnum:]にp{Alnum}アクセント付き文字なども含まれます。
[a-zA-Z0-9]
p{Alnum}