cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
fw_mon
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 1 of 4

MWG: convert string to low case

Jump to solution

there is no function to convert a string to a low case, besides using ReplaceAllMatches 26 times, right? I know most comparison operators in MWG are case insensitive, I need it for logging.

Tags (1)
2 Solutions

Accepted Solutions
mkutrieba
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 4

Re: MWG: convert string to low case

Jump to solution

Hi,

attached is a screenshot showing conversion from upper to lower case. \U i used for upper case and \L for lower case.

This did work for me with single rule. In my example I had 2 rules, first one making mwginternal.com to MWGINTERNAL.COM and second one (screenshot) back from MWGINTERNAL.COM to mwginternal.com.

Convert string to lower case.JPG

Regards,
Marcel Kutrieba
Technical Support Engineer

If you find this post useful, Please give it a Kudos! Also, Please don't forget to select "Accept as a solution" if this reply resolves your query!

View solution in original post

asabban
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 4 of 4

Re: MWG: convert string to low case

Jump to solution

Hello,

regular expressions are processed using the boost library. This is the reference:

https://www.boost.org/doc/libs/1_62_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

This is the library version and syntax that is used. Please note a couple of things:

- If you have a list with regular expressions those are compiled into one large expression. This compilation will break some of the switches

- The boost library is called with several options (such as bein case insensitive), which are hard coded in the code. Thus - without access to the code - you cannot use all of the features/switches described on the page

- Not all of the switches/features are tested, only basic functionatliy (which is why we have not described all of the possible switches in the documentation)

Hope it helps 🙂

Andre

View solution in original post

3 Replies
mkutrieba
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 4

Re: MWG: convert string to low case

Jump to solution

Hi,

attached is a screenshot showing conversion from upper to lower case. \U i used for upper case and \L for lower case.

This did work for me with single rule. In my example I had 2 rules, first one making mwginternal.com to MWGINTERNAL.COM and second one (screenshot) back from MWGINTERNAL.COM to mwginternal.com.

Convert string to lower case.JPG

Regards,
Marcel Kutrieba
Technical Support Engineer

If you find this post useful, Please give it a Kudos! Also, Please don't forget to select "Accept as a solution" if this reply resolves your query!

View solution in original post

fw_mon
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 3 of 4

Re: MWG: convert string to low case

Jump to solution

that's what I need, thank you Marcel!

Can you please share more info about /L /U and similar modifiers? It is not documented in the product guide.

asabban
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 4 of 4

Re: MWG: convert string to low case

Jump to solution

Hello,

regular expressions are processed using the boost library. This is the reference:

https://www.boost.org/doc/libs/1_62_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

This is the library version and syntax that is used. Please note a couple of things:

- If you have a list with regular expressions those are compiled into one large expression. This compilation will break some of the switches

- The boost library is called with several options (such as bein case insensitive), which are hard coded in the code. Thus - without access to the code - you cannot use all of the features/switches described on the page

- Not all of the switches/features are tested, only basic functionatliy (which is why we have not described all of the possible switches in the documentation)

Hope it helps 🙂

Andre

View solution in original post

You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community