added scan2 which will be the regex version