Last date modified: 2026-May-28

Run reports on regular expressions results

Regular expression reporting in Contracts lets you view and filter all regular expression results across an entire data set, rather than populating a single field with only the first match per document. This is useful when you need to identify and analyze every occurrence of a pattern—such as dates, dollar amounts, or custom terms—across multiple documents at once.

When you generate a regular expression report, Contracts creates dedicated fields in your workspace to store the values, counts, location data, and error information for every match found.

For example, suppose a regular expression returns 10 results per document across 20 documents. Running a regular expression report places all 10 values into one field on each document, with each value separated by a horizontal line. You can then filter for specific results across all 20 documents.

To generate a regular expression report:

  1. Go to the Contracts Models tab.
  2. Click New Contracts Model.
  3. Enter a name for your model.
  4. For Model Type, select Regular Expression.
  5. Add a description.
  6. On the Regular Expression card, select your regular expression.
  7. On the Action card, select Generate Report.
  8. On the Generate Report card, select the Value Field Type where Contracts will store all regular expression values.
    For example, if you are using the Date regular expression, you may want this field to be a Date field type. If your regular expression finds a block of text, select Long Text.
    An image of the Generate Report section and Value Field Type selector.
  9. Click Save.

To run analysis on your regular expression report:

  1. Go to the Contracts Analysis Profiles tab.
  2. Click New Contracts Analysis Profile.
  3. Enter a name for your analysis profile.
  4. Add a description.
  5. On the Extraction tab, add the model you created.
  6. Click Save.
  7. Go to the Contracts Analysis Sets tab.
  8. Click New Contracts Analysis Set.
  9. Enter a name for your analysis set.
  10. Choose the analysis profile you created.
  11. Select a saved search to run the analysis on.
  12. Click Save.
  13. Click Analyze.

The status of the analysis appears under the Status section. When the analysis is complete, click Refresh to update the page and view results.

Reporting fields Contracts creates and auto-populates

When you run a regular expression report, Contracts automatically creates and populates several fields in your workspace. The names of these fields depend on the name of your regular expression and the IDs for your analysis set and model.

  • When you delete an analysis set that uses a regular expression model with report generation, Contracts automatically deletes any objects and fields it created to keep your workspace clean.
  • When you re-run a regular expression model that generates a report, Contracts replaces the existing field values instead of appending to them.
  • Contracts populates section documents with all reporting fields in addition to the main agreement.

The following table describes each field Contracts creates. These example names are based on a regular expression called "Date," a model ID of 1040099, and an analysis set ID of 1040101. Your actual field names vary based on your regular expression name and IDs.

Example field name Field type Field auto population
Date Analysis _1040099_1040101 Multiple Object

Auto-populated with a unique ID for each result that will look like "cddc9d22-abd0-4680-b94c-997d32390593" so that other data about your regular expression can be stored.

You will likely not need to use this field.

Date Analysis _1040099_1040101::Value The field type you selected in Step 8 on how to generate a regular expression report.

Auto-populated with every result of your regular expression for the document, each separated by a horizontal line.

The field type you choose will drive the filtering capability you have on the document list in Relativity. For example, if you choose a date field type, you will be able to filter on this value field with a date selector.

Date Analysis Count_1040099_1040101 Whole number

Auto-populated with total number of regular expression results found in the document.

Be aware that the naming convention for the count field varies slightly from the other reporting fields.

Date Analysis _1040099_1040101::Start Whole number Auto-populated with the location coordinates for the start of the result in the document.
Date Analysis _1040099_1040101::Length Whole number Auto-populated with the total length of the result in the document.
Date Analysis _1040099_1040101::Error Message Fixed-length text

Auto-populated with any error messages, per result.

For example, if you've chosen a fixed-length text field for the Value field type but the result is too many characters to fit, an error message will appear.

Return to top of the page
Feedback