謝謝你,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