Hi Bamboo Experts,
We are trying to use Bamboo plan spec to create a build plan that contains branch management with matching Regex, the formula we use is
^(CIPG|CDO)-\d{1,8}$

code snippet:
---------------------------------------------------------------
Plan plan = new Plan(new Project()
.key(new BambooKey("xxxxx"))
.name("xxxxxx")
.description("xxxxxx"),
"xxxxxxxxx",
new BambooKey("xxxxx"))
.planBranchManagement(new PlanBranchManagement()
.createForVcsBranchMatching("^(CIPG|CDO)-\\d{1,8}$")
.delete(new BranchCleanup()
.whenRemovedFromRepositoryAfterDays(0))
.notificationForCommitters());
bambooServer.publish(plan);
-----------------------------------------------------------------
we have existing plans that created manually which contains this regex, so we do an export under 'View plan as Bamboo Specs', check the code into source control and execute it(Publish plan) by building the code. However, the plan that is generated by the java code drops everything after the character comma (,).
regex ends up like
^(CIPG|CDO)-\d{1,
We have tried to escape comma with slash (\) and double slashes (\\), but both ones ends with error.
so what adjustment need to made to original exported plan spec to make it publish correct build plan ?