我正在努力想出一个匹配的正则表达式:
/me slaps John around with a trout
和输出
Group 1: /me
Group 2: slaps John around with a trout
任何帮助将不胜感激:)
答案 0 :(得分:1)
的内容
^(\/me) (.*)$
答案 1 :(得分:0)
你的正则表达式是这样的 (/ ME)\ S +(。*?)$
(/me) << first group
\s+ << then one or more whitespace
(.*?) << second group, one or more characters
$ << end of line