Match IRC Channel with regular expression

前端 未结 1 1511
日久生厌
日久生厌 2021-01-14 21:38

How would one go about using regular expressions to match IRC channel names? The names would have the preceding hash symbol (#) included.

1条回答
  •  长发绾君心
    2021-01-14 22:18

    /([#&][^\x07\x2C\s]{,200})/
    

    Should do it, according to RFC1459's specification.

    0 讨论(0)
提交回复
热议问题