2013-05-07 14 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))。 –

関連する問題