cancel
Showing results for 
Search instead for 
Did you mean: 

Spaces in "matches regex"

smitty3501
05 Base Camper

Spaces in "matches regex"

so we have a new user who happens to have one of our keywords in his name...  "abort"   this is causing some false alerts when he get logged.

 

old code:

MATCHES REGEX "(?i)^PROD.+(IN FILE ERRSmiley IndifferentFAILED WITH A JSI|REJECTED|ABORT|ZZSA|

 

can I do the following to eliminate this error ( basically want to add spaces around the word "abort" since his name is  CHAKRABORTY )

 

new code ?

MATCHES REGEX "(?i)^PROD.+(IN FILE ERRSmiley IndifferentFAILED WITH A JSI|REJECTED| ABORT |ZZSA|

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Spaces in "matches regex"

Hi @smitty3501,

 

You could use the delimited value for a single space:

\sABORT

For one or more spaces:

\s+ABORT

I also find this web site is extremely useful for testing out regular expressions: https://regex101.com/

Hope this helps!

Regards,

Scott Clement

View solution in original post

3 REPLIES 3

Re: Spaces in "matches regex"

Hi @smitty3501,

 

You could use the delimited value for a single space:

\sABORT

For one or more spaces:

\s+ABORT

I also find this web site is extremely useful for testing out regular expressions: https://regex101.com/

Hope this helps!

Regards,

Scott Clement

smitty3501
05 Base Camper

Re: Spaces in "matches regex"

Thanks Scott,  unfortunately my employer wont allow access to that site from inside the organization

Re: Spaces in "matches regex"

Hi @smitty3501,

Sorry to hear that's not an option for you. If you do some searching, you can also find free or paid downloadable utilities that will do the same thing without an internet connection, although I'm confident that would be an option for you either.

Hopefully you don't have to work with regular expressions too often!

Regards,

Scott Clement

Webinar: Keep the modern workforce connected

Unified Communications has always been an important part of companies' digital transformation efforts due to its ability to enable rich virtual collaboration and communication. But with COVID-19, we've reached a break-through point.

Join Bill Haskins, Sr. Analyst & Partner, Unified Communications at Wainhouse Research, and John Ruthven, CEO at IR discuss UC challenges companies are experiencing due to the COVOID-19 crisis.

Join webinar
Top Liked Members