How would one go about using regular expressions to match IRC channel names? The names would have the preceding hash symbol (#
) included.
/([#&][^\x07\x2C\s]{,200})/
Should do it, according to RFC1459's specification.
来源:https://stackoverflow.com/questions/4953301/match-irc-channel-with-regular-expression