Matches REGEX 101

Today I will be showing how "matches REGEX" works and how it can help you in creating more robust Smart Labels.

Matches REGEX is an arguement that requires proper syntax to work correctly.  There are certain fields in the Smart Label wizard that will allow you to use this arguement.

Here is an example of a Patch Label I created for my environment to narrow down the patches I download to my KBOX through my subscription settings.

(Note:  The syntax requires you to put a "|" between each word/value you want to search for.)

This Query is looking in the patch database for any patches that match the following criteria:

Title=Flash or Reader or Java or Shockwave or Acrobat AND

Impact = Critical AND

Patch Type = OS AND

Language = English

This enables me to create one smart label to patch all my web friendly applications and frees up disk space!

(Note:  If you limit your patch downloads via Smart Labels only the patches listed in the Smart Labels AND the OS settings you have chosen will be downloaded.)

 Check out those results!!


{For those learning SQL}

Here is the query in code:

[

select UID from KBSYS.PATCHLINK_PATCH where ((((  KBSYS.PATCHLINK_PATCH.TITLE rlike 'Flash|Reader|Java|Shockwave|Acrobat') AND KBSYS.PATCHLINK_PATCH.IMPACTID = 'Critical') AND KBSYS.PATCHLINK_PATCH.IS_APP = '1') AND (1  in (select 1 from KBSYS.PATCHLINK_PACKAGE, KBSYS.PATCHLINK_PACKAGE_LANGUAGE_JT where PATCHLINK_PATCH.UID = PATCHLINK_PACKAGE.PATCHUID and PATCHLINK_PACKAGE_LANGUAGE_JT.FILENAME = PATCHLINK_PACKAGE.FILENAME and KBSYS.PATCHLINK_PACKAGE_LANGUAGE_JT.LANGUAGE_ID in (1,255,0) )) )

]

If this helps you please rate it!

Have a Happy New Year everyone!!