Add regex support to target code matching methods