The Job naming pattern is working for simple pattern, however I am unable to include conditional regex (if) in the pattern
(_)?(?(1)[\w]{1,15} )
. Meaning _ is a optional string, if found then a string of length 1 to 15 should be available. Also, I would need to set similar Node naming pattern as we are having more nodes
This is not a valid Java regular expression, and the error message tells you so.
If you disagree, please provide sample code for the script console in Jenkins that shows that your regular expression is valid and matches according to your expectations.