regex scanning works