X(?!Y) works when it is used in a RegEx but the plugins botches as soon as 
you start to combine several negations.

X(?!Y)|A(!?B) won't behave as expected.
Applying the de Morgan's law (double negation to create and AND from an OR) 
does not interest the plugin at all.
I tried (!?(X(?!Y)|A(!?B)), (!?((X(?!Y)|A(!?B))) and all other combinations 
that made sense to me.

Latest crime I committed was: 
(!?((!?((.*)GUIDE_MIB.*))|(!?((.*)GUIDE_Pxxxxxx(.*)))|(!?((.*)GUIDE_(.*)P4))))
Looks like that Jenkins does not care about negations when combining 
patterns :/

Am Freitag, 19. September 2014 12:04:24 UTC+2 schrieb Gunnar Strand:
>
>  
> On 09/19/14 11:27, Jan Seidel wrote:
>  
> True (.*) is very greedy, but (?!P4) is a but not P4 and I would expect it 
> to work.
> It isn't as I just figured out in a test run with a completely different 
> RegEx to skim for other jobs :/
>  
>
> I don't know what kind of regex the Matrix supports, but "X(?!Y)" normally 
> means "X" not followed by "Y". If you precede it with a match anything 
> repeating pattern: "X.*(?!Y), the parser will happily match "XY" where "Y" 
> is matched using the ".*" pattern, and determine that the matching string 
> XY is not followed by "Y", hence it returns true. Using a negative 
> look-ahead pattern is tricky, you must anchor the pattern to something.
>
> BR
> Gunnar
>
>  

-- 
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/d/optout.

Reply via email to