changing searching to regex