Nice advice! :)

what does *?:* actually imply?
Where do I find this information?

If you want to allow that MIB can appear anywhere else other that 
immmediately after GUIDE_ you can change the regex for :
(.*)GUIDE_(?!MIB)((?!P4).)*$

This pattern confuses me a bit... Ooooohh.... now I get it. Dumb little me 
XD
That explains another issue I have. *geesh* I start to become dizzy of RegEx

Thanks for helping out.
I will do some tests right away

Cheers
Jan

Am Freitag, 19. September 2014 12:53:12 UTC+2 schrieb DarkRift:
>
> As a few people already mentioned you need to anchor your pattern. 
> Otherwise, .* might match what you want to exclude and attempt the match 
> after it, resulting in an unwanted result.
>
> What your regx is doing in words is this:
>
> (.*) match anywhere
> GUIDE_ : normal text match
> (?!MIB) : immediately not followed by MIB
> (.*) : match anywhere
> (?!P4) : not followed by P4
>
> Now, what you want to do if MIB and P4 can be anywhere after GUIDE_ is to 
> match every character and the make sure it is not followed by any of those, 
> up to the end. The regex for that would be:
>
> (.*)GUIDE_(?:(?!MIB)(?!P4).)*$
>
> The fancy part at the end translates into :
>
> Make sure the following text is neither MIB or P4 when you try to match 
> the next char, up to the end of string. it does not make a distinction 
> weither MIB comes before or after P4. It will make sure any of those is not 
> after GUIDE_
>
> Richard Lavoie
>
>
 

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to