A regex that starts with .* and ends with (opt1|opt2)* will always match all strings. I think you want something like .*( opt1|opt2)+ where the trailing + means at least one thing from opt1|opt2 must be present.
From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Eric Fetzer Sent: 01 March 2016 14:21 To: Jenkins Users Subject: Re: Conditional Step Regular Expression Match Thanks for the reply Eric! Sorry, the square brackets are just from the Jenkins output. My regex's look like this (4 single conditional steps based on the label passed in build.apps): .*(NAP-Client|NAP-ALL)* .*(NAP-Server|NAP-ALL)* .*(NAP-Reports|NAP-ALL)* .*(CAS|NAP-ALL)* In this particular case, I passed in build.apps='NAP-Client,NAP-Server' So it should go in and trigger the build associated with these two regex's. But what it does is go into all 4 and build them. I'm guessing I could put anything at all in the Label and it would match for all of these conditions because of a mistake I'm making in my regex. Thanks, Eric On Monday, February 29, 2016 at 2:32:08 PM UTC-7, Eric Fetzer wrote: I don't understand why the following is a match for my regex. Can someone tell me what makes it a match? Regular expression run condition: Expression=[.*(OIS-Reports|OIS-ALL)*], Label=[OIS-Client,OIS-Server] Run condition [Regular expression match] enabling perform for step [Trigger/call builds on other projects] Thanks, Eric -- 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<mailto:jenkinsci-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8b0a1962-9ebe-4623-bc34-9e9e20d1fbab%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/8b0a1962-9ebe-4623-bc34-9e9e20d1fbab%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- 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/6836E1DC2DDC174C9D64B7860E5AF5FCA90F7519%40EXCHMBX01.fed.cclrc.ac.uk. For more options, visit https://groups.google.com/d/optout.