Match IRC Channel with regular expression

2019-02-19 09:43发布

问题:

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

回答1:

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

Should do it, according to RFC1459's specification.



标签: regex irc