Ruby 正则表达式问题

ZhouYiYu · August 05, 2017 · Last by chenge replied at August 05, 2017 · 1102 hits

正则表示式/AAA*C/是什么意思

非 AB 的意思。

Reply to chenge

那 [^0-9][^A-Z] 是什么意思? 字符串为 1A2B3C 会匹配成功吗?

Reply to chenge

0 和 A 之前都有^

Reply to ZhouYiYu
 "1A2B3C".scan /[^0-9][^A-Z]/
=> ["A2", "B3"]
ZhouYiYu closed this topic. 05 Aug 14:54
ZhouYiYu reopened this topic. 05 Aug 14:54
You need to Sign in before reply, if you don't have an account, please Sign up first.