.*B.* ?
Richard. On Tue, Aug 13, 2013 at 10:13 PM, LarsR <[email protected]> wrote: > Thanks Richard, > I have tested B.* and it works but it seems to do so because B is the > first character in "BCSMLX". If I try something like C.* it fails. I > realize might have been unclear in my first message but I want to check if > a specific character is present *anywhere* in the test string. (The > string represents six different build steps that I want to be able to > switch on or off just by removing the letter for the step.) > > Lars > > Den måndagen den 12:e augusti 2013 kl. 21:08:03 UTC+2 skrev Richard > Bywater: > >> Right off the top of my head, so likely wrong, how about B.* >> >> I find if you don't use regexes everyday then its always hard picking >> them up again! :) >> >> Richard >> >> On Tuesday, August 13, 2013, LarsR wrote: >> >>> Hi, >>> I'm setting up Jenkins on Windows and plan to use some conditional build >>> steps in my scripts, so I installed the conditional buildstep plugin >>> together with the run-condition & token macros plugins. >>> >>> I'm trying to use the regular expression match for the condition but >>> cannot get a simple substring match to work. The test setting in the script >>> defintion is as follows: >>> >>> Expression: B >>> Label: BCSMLX >>> >>> And the output when run is: >>> >>> : >>> Regular expression run condition: Expression=[B], Label=[BCSMLX] >>> Run condition [Regular expression match] preventing perform for step >>> [BuilderChain] >>> : >>> >>> The only expression I manage to get to work is the one following the >>> example doc for the plugin: >>> >>> Expression: ^BCSMLX$ >>> Label: BCSMLX >>> >>> But for that I could as well use string compare. >>> >>> Now I am no expert in regular expressions but all I find on the web >>> indicates that expression "B" should result in a match if B is found >>> anywhere in the string. I have also tried ^B and B{1} but none of these >>> work either. >>> >>> But I'm probably doing something stupid... can somebody please help me >>> out? >>> >>> My setup: >>> >>> Jenkins 1.526 >>> conditional buildstep 1.3 >>> run-condition 0.10 >>> token macro 1.8.1 >>> >>> Cheers, >>> Lars >>> >>> >>> >>> -- >>> 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 [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> -- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
