谢谢你,Phil,那确实找到了我在找的东西。我也搞错了,: 在正则表达式中并不是元字符。实际上,正则表达式 \\fq [^\\]*?\\ft\s[^:] 和正则表达式 \\fq [^\\]*?\\ft\s[^\:] 给出了相同(良好)的结果,我正在试图理解这一点。所以,为了更好地理解 PT 中的这个正则表达式:
\s[^:] 是指空格后的第一个非冒号字符吗?
那么:
\s[^\:] 是指第一个非反斜杠字符后跟一个冒号吗?还是指第一个非反斜杠字符后跟一个非冒号字符?
非常感谢,
Bart.
Thank you Phil, that did find what I was looking for. I was also mistaken about the : which is not a metacharacter in regex. Actually, the regex \\fq [^\\]*?\\ft\s[^:] and the regex \\fq [^\\]*?\\ft\s[^\:] deliver the same (good) result, which I am trying to understand. So, just for the sake of a better understanding of this regex in PT:
does \s[^:] mean the first non-colon after a space?
then:
would \s[^\:] mean the first non-backslash followed by a colon? Or does it mean the first non-backslash followed by a non-colon?
Much obliged,
Bart.
机器翻译自 English