输入banner图图片脚本导航/分类

使用正则匹配3的倍数

代码来自于:http://www.zhihu.com/question/24824487

推荐使用Regexp Match Tracer来测试正则
  1. ^[0369]*(([147][0369]*|[258][0369]*[258][0369]*)([147][0369]*[258][0369]*)*([258][0369]*|[147][0369]*[147][0369]*)|[258][0369]*[147][0369]*)*$