2013-05-07 2 views

답변

25

negative lookahead assertions의 경우와 같습니다.

&(?!(?:apos|quot|[gl]t|amp);|#) 

.

설명 :

&  # Match & 
(?!  # only if it's not followed by 
(?:  # either 
    apos # apos 
|quot # or quot 
|[gl]t # or gt/lt 
|amp # or amp 
);  # and a semicolon 
|  # or 
\#  # a hash 
)  # End of lookahead assertion 
+4

니스 정규식, 팀. 나는이 툴에 여전히 애착을 가지고있다. 그래서 나는 [더 매끄러운 다이어그램을 링크하다] (http://www.regexper.com/#%26 (% 3F! (% 3F % 3Aapos % 7Cquot % 7C % 5Bgl % 5Dt % 7Camp) % 3B % 7C % 23)). –