Extractor Script Regex Tips

This section contains a number of tips and examples which will assist in creating Extractor scripts.

Some of the examples in this section are shown for specific platform types (e.g. HPE NonStop or Microsoft Windows), nevertheless, all demonstrated Regex related techniques can be universally applied to multiple platforms.

It is highly recommended to check Regex against a sample of Extractor input data with a tool first before using it in an Extractor script. Two tools which are useful for this purpose are:

  • Regex Workbench
    This is available from the Microsoft site as MSDN Code Gallery download – search msdn.microsoft.com for “Regular Expression Workbench”. The tool uses .NET but Regex support is very close. After starting the tool for the first time, tick IgnoreWhitespace and IgnoreCase checkboxes. It will remember these settings.

  • pcregrep
    This tool comes as a part of the PCRE library distribution. It will show the overall match only, no information about named captures is shown.

Provide feedback on this article