[build][core] handle regex tokens