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
[JENKINS-28912] CLONE - Job and Node naming convention
Summary | Original: CLONE - Job and Project naming convention | New: CLONE - Job naming and Node naming convention |
Description | Original: Both 'Job' and 'Project' are used, but is unclear what the difference is. A new Job seems to create a Project and one can delete a Project but not a Job. One concept should be used in my opinion unless the difference is clearly distinguishable. | New: 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 |
Priority | Original: Trivial [ 5 ] | New: Major [ 3 ] |
Labels | Original: job | New: job naming node |
Description | Original: 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 | New: The Job naming pattern is working for simple pattern, however I am unable to include conditional regex (if) in the pattern {code}(_)?(?(1)[\w]{1,15} ){code}. 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 |
Resolution | New: Not A Defect [ 7 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Resolution | Original: Not A Defect [ 7 ] | |
Status | Original: Resolved [ 5 ] | New: Reopened [ 4 ] |
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.