As far as I can see, the “Label” is just a string. So Label=[NAP-Client,NAP-Server] does not try comparing 2 different string with the regex, it’s simply a single string that happebns to have a comma in the middle of it. That comma does not means anything special, because this is not a regex.
So, the first Expression=[.*(NAP-Client|NAP-ALL)+], Label=[NAP-Client,NAP-Server] example, which you say gives the wrong result: The regex will match something that ENDS with either NAP-Client or NAP-ALL. The label does not match that. I think what you want is .*(NAP-Client|NAP-ALL).* which matches either NAP-Client or NAP-ALL, surrounded by anything (or nothing). This is similar to what you first had, except that it ends with “.*” rather than “*”. Hope that helps and that I’ve understood correctly what’s going on. Matthew Webber From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Eric Fetzer Sent: 01 March 2016 16:14 To: Jenkins Users Subject: Re: Conditional Step Regular Expression Match Thanks for your response Matthew! With your change, we seem to be a lot closer. I have from 1 to 4 conditional projects to call. In this particular build, I'm telling it to do 2 of the 4. Here's what it did based on the condition: Regular expression run condition: Expression=[.*(NAP-Client|NAP-ALL)+], Label=[NAP-Client,NAP-Server] Run condition [Regular expression match] preventing perform for step [Trigger/call builds on other projects] Didn't go into this one which it should have Regular expression run condition: Expression=[.*(NAP-Server|NAP-ALL)+], Label=[NAP-Client,NAP-Server] Went into this one as it should have Run condition [Regular expression match] enabling perform for step [Trigger/call builds on other projects] Returning node parameter for master Waiting for the completion of NAP-Server<http://nd100bd001:8080/job/NAP-Server/> NAP-Server #98<http://nd100bd001:8080/job/NAP-Server/98/> completed. Result was SUCCESS Regular expression run condition: Expression=[.*(NAP-Reports|NAP-ALL)+], Label=[NAP-Client,NAP-Server] Didn't go in as it shouldn't have Run condition [Regular expression match] preventing perform for step [Trigger/call builds on other projects] Regular expression run condition: Expression=[.*(CAS|NAP-ALL)+], Label=[NAP-Client,NAP-Server] Didn't go in as it shouldn't have Run condition [Regular expression match] preventing perform for step [Trigger/call builds on other projects] Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered Is it having a problem with the ".*" because NAP-Client occurs at the beginning of the line? -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6836E1DC2DDC174C9D64B7860E5AF5FCA90F76EE%40EXCHMBX01.fed.cclrc.ac.uk. For more options, visit https://groups.google.com/d/optout.