Examples of Some Useful REX Expressions

  • To locate phone numbers:

  • To locate social security numbers:

  • To locate text between parentheses:
    (=[^()]+)      <- without direction specification
    >>(=!)+)       <- with direction specification

  • To locate paragraphs delimited by an empty line and 5 spaces:

  • To locate numbers in scientific notation; e.g., "-3.14 e -21":

You can formulate patterns of things to look for using these types of patterns. You can look for a REX expression by itself, or in proximity to another search item. Such a search could combine a REX expression in union with an intelligent concept search. For example, you could enter the following in a query input box:

"/\digit{2}%" measurement

The REX expression indicates 2 occurrences of any digit followed by a percent sign. "Measurement" will be treated as an English root word with its list of equivalences, and passed to PPM.

In this search, Metamorph will look for an intersection of both elements inside the specified delimiters, and may come up with a hit such as:

They estimated that only 65% of the population showed up to vote.

where "estimated" was associated with "measurement", and "65%" was associated with the pattern "\digit{2}%".

Copyright © Thunderstone Software     Last updated: May 19 2023
Copyright © 2023 Thunderstone Software LLC. All rights reserved.