0
문자열을 제외하는 방법내가</p> <blockquote> <p>VSS 기록기가</p> </blockquote> <p>정규식 내가 패턴 일치를 사용하고 메모리 부족 메시지에서 문자열 "VSS"를 제외 할
입니다[O,o]ut of [M,m]emory
하지만 VSS가 메시지에 포함되면 해당 전체 메시지를 제외하고 싶습니다. 이것이 가능한가?
문자열을 제외하는 방법내가</p> <blockquote> <p>VSS 기록기가</p> </blockquote> <p>정규식 내가 패턴 일치를 사용하고 메모리 부족 메시지에서 문자열 "VSS"를 제외 할
입니다[O,o]ut of [M,m]emory
하지만 VSS가 메시지에 포함되면 해당 전체 메시지를 제외하고 싶습니다. 이것이 가능한가?
당신이 부정적인 lookahead assertion를 사용하여 해결할 수 :
이(?i)^(?!.*VSS).*out of memory
설명 : 그런데
(?i) # Make the regex case-insensitive
^ # Match the start of the string
(?!.*VSS) # Assert that there is no "VSS" in the string
.* # Match any number of characters
out of memory # Match "out of memory"
이 [O,o]
는 O
일치 o
또는 ,
, 그래서 그것은 아마도 당신이 의미하는 것이 아닙니다.
어떤 프로그래밍 언어입니까? –