Regular expression for Character classes
'foo@example.com'.match(/\x{email}/g)
// ['foo@example.com']'https://example.com/foo/bar'.match(/\x{url}/g)
// ['https://example.com/foo/bar']'島根県にパソコンなんてあるわけないじゃん'.match(/\x{都道府県}/g)
// ['島根県']'127.0.0.1'.match(/\x{ip}/g)
// ['127.0.0.1']'example.com sub.example.com'.match(/\x{fqdn}/g)
// ['example.com', 'sub.example.com']const str = '時どき私はそんな路を歩きながら、ふと、そこが京都ではなくて京都から何百里も離れた仙台とか長崎とか――そのような市へ今自分が来ているのだ――という錯覚を起こそうと努める。'
await str.matchAsync(/\x{場所}/g)
// ['京都', '京都', '仙台', '長崎']const str = '昨日、ジョンと山田太郎は松のやでカツ丼を食した。'
await str.matchAsync(/\x{人物}/g)
// ['ジョン', '山田太郎']npm install cc-regex<script src="https://github30.github.io/cc-regex/index.js">