Use a more general regexp for matching targets