The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Browse by Tags

All Tags » javascript » out of the box thinking » regex (RSS)
  • Speaking of javaScript...

    ..though this is wrong in any language: var lastChar = str.charAt(emailStr.length - 1); if(!lastChar.match(/[^\.]/i)) { return false; } Rarely do I think " w... t... F???! , but this was one of those times. I guess if( str[str.length-1] == '.' ) return false; wouldn't be case insensitive...
    Posted to Forum by Zecc on 04-24-2008
Page 1 of 1 (1 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems