[gpfsug-discuss] Policy REGEX question

Todd Ruston truston at mbari.org
Thu Feb 20 20:43:03 GMT 2020


Greetings,

I've been working on creating some new policy rules that will require regular expression matching on path names. As a crutch to help me along, I've used the mmfind command to do some searches and used its policy output as a model. Interestingly, it creates REGEX() functions with an undocumented parameter. For example, the following REGEX expression was created in the WHERE clause by mmfind when searching for a pathname pattern:

REGEX(PATH_NAME, '*/xy_survey_*/name/*.tif','f')

The Scale policy documentation for REGEX only mentions 2 parameters, not 3:

REGEX(String,'Pattern')
Returns TRUE if the pattern matches, FALSE if it does not. Pattern is a Posix extended regular expression.

(The above is from https://www.ibm.com/support/knowledgecenter/STXKQY_5.0.2/com.ibm.spectrum.scale.v5r02.doc/bl1adv_stringfcts.htm <https://www.ibm.com/support/knowledgecenter/STXKQY_5.0.2/com.ibm.spectrum.scale.v5r02.doc/bl1adv_stringfcts.htm>)

Anyone know what that 3rd parameter is, what values are allowed there, and what they mean? My assumption is that it's some sort of selector for type of pattern matching engine, because that pattern (2nd parameter) isn't being handled as a standard regex (e.g. the *'s are treated as wildcards, not zero-or-more repeats).

-- 
Todd E. Ruston
Information Systems Manager
Monterey Bay Aquarium Research Institute (MBARI)
7700 Sandholdt Road, Moss Landing, CA, 95039
Phone 831-775-1997      Fax 831-775-1652      http://www.mbari.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gpfsug.org/pipermail/gpfsug-discuss_gpfsug.org/attachments/20200220/01457571/attachment-0001.htm>


More information about the gpfsug-discuss mailing list