Skip navigation.

miscoded

the web is a hack

Posts tagged with "regexp"

Y!RegExp quiz

, , , ...

This snippet is brought to you by Yahoo!Japan blogs. Quiz of the day: what is the RegExp meant to do and why does it fail?

if(img.match(/(.[jJ][pP][eE]?[gG]|.[gG][iI][fF]|.[pP][nN][gG])/)) {
return true;
}
return false;


(Yes, the variable name is a hint.)