simplified method search regex to avoid catastrophic backtracing