BES Client RegEx

A coworker shared the following while researching the use of regex in our agent.

The BES Client uses the boost C++ libraries in the agent:

http://www.boost.org/

So the way relevance regex works is consistent across our agents. This may, however, differ from how regex works in the various shell script contexts.

There are three major families of regex:

  1. "Classic" regex (which peter is following)
  2. POSIX regex, above with extensions like "+" and "{min,max}"
  3. Perl regex, mostly compatible with both of the above. Perl adds a lot of special character class shortcuts and assertions like \w\W and \s\S and \b\B. The latter, which matches a "word boundary" and doesn't actually match a character is particularly useful, but more or less available only in perl.

His understanding is that Boost is mostly "2". Often in SCM because we have to assume only native shell and tools, you are often forced on non-Linux OSes back to family "1".

The wikipedia article is a decent intro to the subject:

http://en.wikipedia.org/wiki/Regular_expression

If you stick to the lowest level, your regex should work everywhere.

I found this extremely helpful and wanted to share this tidbit of information.

Keywords: BES, Client, regex, relevance
2113 Views
11/20/2012 10:58:00 AM
danielheth
danielheth's Avatar

Comments

Log In or Register to leave comments!