Perhaps he hadn't. [Perhaps he didn't?]Perhaps he didn't.[Perhaps he hadn't?]我想匹配括號中的位;以“也許”開頭并以問號結尾的句子。我認為這個正則表達式會起作用:Perhaps.*(?!=\.)\?但是,我得到的是:[Perhaps he hadn't. Perhaps he didn't?]Perhaps he didn't.[Perhaps he hadn't?]為什么是這樣?以及如何解決?https://regexr.com/5dfhs
如果“單詞”和“?”之間有“句號”,則不匹配
幕布斯6054654
2023-04-20 10:47:36