我是新手到regex
這裏是我的問題:正則表達式
下面是該文件的內容:
cts-pdr/comment-primary/:not spamming
cts-pdr/comment-primary/:please remove since not spamming
cts-pdr/comment-primary/:not spamming
cts-pdr/comment-primary/:not spamming
cts-pdr/comment-primary/:Not spamming
cts-pdr/comment-primary/:not spamming
cts-pdr/comment-primary/:please unblock since not spaming
我想在這裏實現的是的第二部分匹配結腸。 我想拍攝整個字符串即:
(please\s.*)? [N|n]ot .*
我不能得到正確的匹配。 任何人都可以幫忙嗎?
這裏不需要正則表達式。拆分冒號並參加第二部分。 –
你可以編輯你的問題,有一個無用的標題,實際上試圖描述你在問什麼? –
正則表達式是過度的。這是一個簡單的使用分裂任務,正如@SergioTulentsev所說。 –