I have jobs in Jenkins that are named in this manner:
Dev.paas.****.****
Qa.paas.****.****
Stg.paas.****.****
Dev.pui.****.****
.
.
.
etc.
I'm trying to create a view that only shows paas
, I enabled regex and I put the following:
*.paas.*
But Jenkins didn't like that and gave me an error.
What is the right way to do this?
The asterisk *
carries special semantics in regular expressions ( namely 'any number of repetitions, including no occurrence at all' ).
Basic regular expressions match at any position in the test string. Therefore you do not need to describe the complete target string(s) in the regular expression., though it is good practice to do so in order to avoid false positives and to potentially speed up execution.
In short:
*
, or*
with a .
(matches any character except newline/line feed), orpaas
is only matched between two full stop characters: \.paas\.
( since .
has a special meaning in regular expressions, , you have to escape it ).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With