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.
これまでのところ、通常のドメインには一致するがアンダースコアのあるドメインには一致しない次の正規表現があります。例: _tcp._sip.45.example.com。どんな助けでも大歓迎です。
(?P<name>([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6})
\b((xn--)?[a-z0-9\w]+(-[a-z0-9]+)*\.)+[a-z]{2,}\b
これを試すか、あなたのものに固執してください。基本的に \w はアンダースコアに追加するものです。