[Cologne-pm] regexp

A. Pagaltzis pagaltzis at gmx.de
Thu Oct 19 09:58:41 PDT 2006


* Johannes Huettemeister <j.huettemeister at googlemail.com> [2006-10-19 18:40]:
> ich suche eine Regex, die auf alle Strings zutrifft, die nicht
> die Strings jpg, png oder gif enthält. Also gerade nicht
> (?:jpg|png|gif) (an lower/upper case muß ich natürlich auch
> noch denken).

Ungetestet:

    ^(?:[^pjg]|p(?!ng)|j(?!pg)|g(?!if))*$

Gruss,
-- 
#Aristoteles
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;


More information about the Cologne-pm mailing list