Add regex support for target code specification