Fix regex handling in search command.