#!/usr/bin/perl $s = "a000000000b"; if ($s =~ /^a.*(?!ab).*b$/) { print "yes"; } else { print "no"; }