Create and edit regular expressions

You can create regular expressions in the Contracts Viewer, adjust your regular expressions, and see results in real time on the document you're viewing. You can also get a preview of results in list format across up to 100 additional documents.

To create regular expressions in the Contracts Viewer:

  1. Click Search in the viewer toolbar.

  2. Click the Regular Expression search toggle.
    An image of the regular expression search toggle.

  3. Enter your desired regular expression. The results will appear beneath the search bar as you type. Use these results to test and edit your regular expression.
    Use the search navigation arrows, the minimap, or the document text itself to navigate between results.

  4. Click Save.

  5. You'll see options expand underneath the search bar to add additional information. Apply your desired options and click Save.

Creating regular expressions in Relativity

Though it's best to create regular expressions in the Viewer, you can also use the Contracts Regular Expressions tab from the Contracts application in Relativity:

  1. Navigate to the Contracts Regular Expressions tab.
    An image of the Contracts Regular Expressions tab.
  2. Click New Contracts Regular Expression from the Contracts Regular Expressions tab.
  3. Add a Name of the regular expression as it will appear in the Data Points pane of the Viewer.
  4. Add a regular expression string.
  5. Provide a description of the regular expression.
  6. Add a saved search filter to your regular expression.
    For example, if you create a saved search of only Termination sections, your date regular expression will only highlight hits if they are in a Termination section.
  7. Toggle visibility by checking the Visible In Contracts Viewer box.
  8. Select a Background Color for the regular expression as displayed in the Viewer.
  9. Click Save.

Editing regular expressions in the Contracts Viewer

To edit regular expressions in the Contracts Viewer:

  1. To edit an existing regular expression within the Contracts Viewer, right-click on the regular expression found on the left side of the Viewer under Data Points.
  2. Click Edit.
  3. The search bar with your regular expression will appear at the top of the Viewer. You can edit the regular expression and view changes to results returned in real time.
    An image of the Regular Expressions Details section of the search bar, where you can edit regex.
  4. Click Save to update that regular expression or Save as New to create a new regular expression.

Editing regular expressions in Relativity

To edit regular expressions in Relativity:

  1. Click the Edit button to the left of a regular expression from your list.
  2. Edit any of your regular expression's information.
  3. Click Save.

Highlight capture groups

You can use highlight capture groups to highlight or match only part of your regular expression pattern.

As an example, let's search for "something important." In the Contracts Viewer, we would highlight all instances of "something important." If you were auto populating a text field with this regular expression, Contracts would find the first occurrence of "something important" and populate your text field accordingly. Let's say that you don't want all of "something important" to be highlighted or fully populated to a field and you only care about the "important" part.

Using the capture group syntax, you could achieve this by changing your regular expression to: "something (?<highlight>important)". Now, Contracts will highlight all instances of "important" that are followed by the text "something". If you were auto populating a text field with this regular expression, Contracts would find the first occurrence of "important" that is followed by "something" and populate your text field accordingly.

It is often the case that certain key data points follow other known terms or variations of those terms. For example:

  • The term "Maturity Date" is typically followed by the date a user is looking for.
  • There are several variations of "as governed by the laws of" that precede a state name that a user wants to find.

Note: If you are using regular expression segmentation, whatever text your capture group matches will populate the Section Heading field.

Regular expression building blocks

When you are building a regular expression in the Contracts Viewer, you have the option of referencing an existing regular expression or persistent highlight set as a block instead of having to write out a tedious pattern.

For example, let's say you want to write a regular expression that can find the Effective Date of a contract. There are some variations of the term "effective as of" that usually precede the date you're looking for. You can write a regular expression to capture all of these variations and name it Effective Term.

Writing a regular expression to capture every possible variation of how dates are formatted is a large endeavor and one that Contracts addresses with its included Date regular expression. In this example, you could reference your Effective Date regular expression and reference Contracts 's Date regular expression.

How to use building blocks

To use regex building blocks:

  1. In the Contracts Viewer, click the Regular Expression Toggle to the right of the search bar.
  2. Type the @ symbol to bring up a menu of existing regular expressions in your workspace.
      Notes: Persistent highlight sets will also show up in this list. If you @ reference a persistent highlight set, Contracts will say, "this block means ANY of the terms in this highlight set".
  3. Select your Effective Term regular expression that, for purposes of this example, you previously created in the Contracts Viewer.
  4. Type .{1,200} which means within 200 characters of.
  5. Type the @ symbol again and select the Contracts Date regular expression:

By using building blocks, you're able to identify the Effective Date.
An image showing regex building blocks used to capture the effective date of a contract.

You can use highlight capture groups to only match on the date and nothing else. Put your date block in parentheses and precede it with "?<highlight>:

Note: Make sure that the regular expressions you've created are not referencing blocks that have been deleted -- i.e. the regular expression which you are referencing no longer exists. Also, make sure that your blocks don't reference each other; this will create a circular dependency and not return any results.

Filter regular expressions by saved searches

If you create a saved search of sections and select it as a Regular Expression Filter, the regular expression will only show hits if they are within sections from your saved search. For example, filtering the Contracts Date regular expression by all Termination sections will not show hits if they are within sections other than Termination sections.

If you create a saved search of contracts, the regular expression will only show hits if they are within contracts from your saved search. For example, filtering a Payment Terms regular expression by all Leases will not show hits in any contracts other than Leases.

To avoid confusion, your saved search filters should consist of either sections or contracts, but not both.

Apply filters to regular expressions

  1. Navigate to the Contracts Regular Expressions tab and select New Contracts Regular Expression.
  2. On the Regular Expression Filter card, select your saved search for the Saved Search Filter field.
  3. All filtered matches are displayed in the Data Points pane in the Contracts Viewer, along with other non-filtered regular expressions.
    A filtered match is signified by the funnel icon.

Example scenario

In the following example, we have created a Saved Search that filters down to display only my “Term, Termination, and Renewal” section types.

  • Based on patterns found reviewing other contracts, if that section contains a date, 9 out of 10 times it contains the termination date we're looking for.
  • Edit the Contracts Date regular expression to be applied on the example Saved Search mentioned above.
  • Add to an Analysis Profile or enable in the Contracts Viewer to review results.

As an example, your documents will fall into one of these categories:

  • Termination Section Not Present -> Dates Present in Contract -> No Highlights
  • Termination Section Present -> Dates Not Present in Termination Section -> No Highlights
  • Termination Section Present -> Date Present in Termination Section -> Highlights Present

Regular expressions shipped with Contracts

The following regular expressions are included with Contracts .

  Finds Examples RegEx
Date Finds all variations of date formats. 8/1/18, First of August, Aug/August 1st, 2018 (?x)(?(DEFINE)(?<month_string>(Jan(uary)?|Feb(ruary)?|Mar(ch)?|Apr(il)?|May|Jun(e)?|Jul(y)?|Aug(ust)?|Sep(tember)?|Oct(ober)?|Nov(ember)?|Dec(ember)?))(?<day_number>\d{1,2})(?<year_number>\d{2,4})(?<month_number>\d{1,2}))(?:(?<day_1>(?&day_number))(?:\s+|-)?(?<month_1>(?&month_string)),?(?:\s+|-)?(?<year_1>(?&year_number))|(?<day_2>(?&day_number))(?:st|nd|rd|th)?\s*day\s*of\s*(?<month_2>(?&month_string)),?\s*(?<year_2>(?&year_number))|(?<month_3>(?&month_string))(?:\s*|-)(?<day_3>(?&day_number))(?:st|nd|rd|th)?,?(?:\s+|-)?(?<year_3>(?&year_number))|(?<month_4>(?&month_string)),?\s+(?<year_4>(?&year_number)))|(?:(?&day_number)(?:\/|-)(?&month_number)(?:\/|-)(?&year_number)|(?&year_number)(?:\/|-)(?&month_number)(?:\/|-)(?&day_number))
Duration Finds textual and numeric periods of time. thirty days, 1 month, per month (?x)(?(DEFINE)(?<one_to_9>(?:f(?:ive|our)|s(?:even|ix)|t(?:hree|wo)|(?:ni|o)ne|eight))(?<ten_to_19>(?:(?:(?:s(?:even|ix)|f(?:our|if)|nine)te|e(?:ighte|lev))en|t(?:(?:hirte)?en|welve)))(?<two_digit_prefix>(?:s(?:even|ix)|t(?:hir|wen)|f(?:if|or)|eigh|nine)ty)(?<one_to_99>(?&two_digit_prefix)(?:[- ](?&one_to_9))?|(?&ten_to_19)|(?&one_to_9))(?<one_to_999>(?&one_to_9)[ ]hundred(?:[ ](?:and[ ])?(?&one_to_99))?|(?&one_to_99))(?<one_to_999_999>(?&one_to_999)[ ]thousand(?:[ ](?&one_to_999))?|(?&one_to_999))(?<one_to_999_999_999>(?&one_to_999)[ ]million(?:[ ](?&one_to_999_999))?|(?&one_to_999_999))(?<one_to_999_999_999_999>(?&one_to_999)[ ]billion(?:[ ](?&one_to_999_999_999))?|(?&one_to_999_999_999))(?<one_to_999_999_999_999_999>(?&one_to_999)[ ]trillion(?:[ ](?&one_to_999_999_999_999))?|(?&one_to_999_999_999_999))(?<bignumber>zero|(?&one_to_999_999_999_999))(?<periods>((quarter|month|week|day)(ly|s)?)(\s+period)?)(?<first_last>(?:first\s+|last\s+)?(quarter(s)?|month(s)?|week(s)?|day(ly|s)?)?\s+of\s+(?:a|the)\s+(year|quarter|month|week))(?<cadence>\b(year|quarter|month|week|day|dai)(s|ly)?\b))(zero|(?&one_to_999)\s)?(\(\d+\)|\d+)\s*-?(\s*\w+\s*){0,2}years?(\s+period)?|(zero|(?&one_to_999)\s*)-?years?(\s+period)?|((each)(-|\s+)?)?calendar(-|\s+)?(year)|((bi|semi|current)(-|\s)?)(year(ly)?)|((bi|semi|per)(-|\s)?)?(annual(ly)?|annum)|(once|twice)(-|\s)?(per|a)(-|\s)?year|(zero|(?&one_to_99)\s)?(\(\d+\)|\d+)(-?\s?)(?&periods)|\(?\d+\)?(-?\s?)(\s+\w+\s+){1,3}(quarter(ly|s)?)|((bi|semi|per)(-|\s)?)(quarter(ly)?)|quarter(-|\s)?to(-|\s)?quarter|calendar\s+quarters?|each\s+quarters?|(zero|(?&one_to_99)\s)?(\(\d+\)|\d+)(-?|\s?)(?&periods)|(every\s+)(zero|(?&one_to_99)\s)?(\(?\d+\)?)?(-?|\s?)(?&periods)|\(?\d+\)?(-?\s?)(\s+\w+\s+){1,3}(month(ly|s)?)|((bi|semi|per)(-|\s)?)(month(ly)?)|month(-|\s)?to(-|\s)?month|calendar\s+months?|(((?:\d{1,2}(st|nd|rd|th))|(first|last|once|twice))(\s+of)?\s+)?(a|the|each)\s+month|(zero|(?&one_to_99)\s)?(\(\d+\)|\d+)(-?\s?)(?&periods)|(\(\d+\)|\d+)(-?\s?)(\s+\w+\s+){1,3}(week(ly|s)?)(\s+period)?|((bi|semi|per)(-|\s)?)(week(ly)?)|week(-|\s)?to(-|\s)?week|(net\s+)?(zero|(?&one_to_999_999_999_999)\s)?\(?[1-9]\d*\)?(-?\s?)?(?&periods)|(zero|(?&one_to_999_999_999_999)\s)?\(?[1-9]\d*\)?(-?\s?)(\s+\w+\s*){1,3}(day(ly|s)?)|(next|last)(\s+\w+\s+){1,3}(day(ly|s)?)|day(-|\s)?to(-|\s)?day|(?&first_last)|(?&cadence)
Currency Finds all numeric values that contain a currency ($) symbol. $29.00, twenty-nine dollars (€|\$|£)\s*(\d{1,3}(\,?\d{3}|\d+)*|(\d+))((\.\d+)?[K|M|B]?)
Percentage Finds all numeric values that contain the percent (%) symbol. 3.45% Base Rate, 100% of compensation \.?\d+(?:\.\d+)?\s*%
Reference Finds all references to sections or subsections across the document. to Section 18, in Section 4(d) \b(?<prefix>[Ii]n|[Bb]y|[Ww]ith|[Oo]f|[Uu]nder|[Tt]o|[Ii]ncluding|[Pp]er|[Tt]his|[Nn]otwithstanding|[Oo]r|[Tt]he|[An]d)[.,'\s]+(?<descriptor>[Ss]ection|[Pp]aragraph|[Ss]ections|[Cc]lause|[Cc]lauses)[.,'\s]+(?<subsection>(?<section>(?:\d+|(?:\(?\w+\)?){1}))(?:[.,'\s][0-9]+)*)(?<inner>(?:\(\w+\))+)?
Numbers Finds all numbers in common formats. 1, 100.32, 1,000.32, 1,000 ((\d{1,3}(\,?\d{3}|\d+)*|(\d+))(\.\d+)?)
State names Finds all long state names as well as their short names. Michigan, IN, IL, Montana (Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|Florida|Georgia|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New\s*Hampshire|New\s*Jersey|New\s*Mexico|New\s*York|North\s*Carolina|North\s*Dakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode\s*Island|South\s*Carolina|South\s*Dakota|Tennessee|Texas|Utah|Vermont|Virginia|Washington|West\s*Virginia|Wisconsin|Wyoming)|(AL|AK|AZ|AR|CA|CO|CT|DE|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY)
Social security numbers Finds all Social Security numbers. 111-11-1111 \d{3}-\d{2}-\d{4}
Country names Finds all country names. Afghanistan, Germany, Cameroon Afghanistan|Albania|Algeria|Andorra|Angola|Antigua\s{0,4}and\s{0,4}Barbuda|Argentina|Armenia|Australia|Austria(n\s{0,4}Empire)?|Azerbaijan|Baden|Bahamas|Bahrain|Bangladesh|Barbados|Bavaria|Belarus|Belgium|Belize|Benin|Bolivia|Bosnia\s{0,4}and\s{0,4}Herzegovina|Botswana|Brazil|Brunei|Brunswick\s{0,4}and\s{0,4}Lüneburg|Bulgaria|Burkina\s{0,4}Faso|Burma|Burundi|Cabo\s{0,4}Verde|Cambodia|Cameroon|Canada|Cayman\s{0,4}Islands|Central\s{0,4}African\s{0,4}Republic|Central\s{0,4}American\s{0,4}Federation|Chad|Chile|China|Colombia|Comoros|Congo\s{0,4}Free\s{0,4}State|Costa\s{0,4}Rica|Cote\s{0,4}d’Ivoire|Croatia|Cuba|Cyprus|Czechia|Czechoslovakia|Democratic\s{0,4}Republic\s{0,4}of\s{0,4}the\s{0,4}Congo|Denmark|Djibouti|Dominica(n\s{0,4}Republic)?|Duchy\s{0,4}of\s{0,4}Parma|East\s{0,4}Germany|Ecuador|Egypt|El\s{0,4}Salvador|Equatorial\s{0,4}Guinea|Eritrea|Estonia|Eswatini|Ethiopia|Federal\s{0,4}Government\s{0,4}of\s{0,4}Germany|Fiji|Finland|France|Gabon|Gambia|Georgia|Germany|Ghana|Grand\s{0,4}Duchy\s{0,4}of\s{0,4}Tuscany|Greece|Grenada|Guatemala|Guinea(-Bissau)?|Guyana|Haiti|Hanover|Hanseatic\s{0,4}Republics|Hawaii|Hesse|Holy\s{0,4}See|Honduras|Hungary|Iceland|India|Indonesia|Iran|Iraq|Ireland|Israel|Italy|Jamaica|Japan|Jordan|Kazakhstan|Kenya|Kingdom\s{0,4}of\s{0,4}Serbia/Yugoslavia|Kiribati|Korea|Kosovo|Kuwait|Kyrgyzstan|Laos|Latvia|Lebanon|Lesotho|Lew\s{0,4}Chew|Liberia|Libya|Liechtenstein|Lithuania|Luxembourg|Madagascar|Malawi|Malaysia|Maldives|Mali|Malta|Marshall\s{0,4}Islands|Mauritania|Mauritius|Mecklenburg-Schwerin|Mecklenburg-Strelitz|Mexico|Micronesia|Moldova|Monaco|Mongolia|Montenegro|Morocco|Mozambique|Namibia|Nassau|Nauru|Nepal|Netherlands|New\s{0,4}Zealand|Nicaragua|Niger(ia)?|North\s{0,4}German\s{0,4}Confederation|North\s{0,4}German\s{0,4}Union|North\s{0,4}Macedonia|Norway|Oldenburg|Oman|Orange\s{0,4}Free\s{0,4}State|Pakistan|Palau|Panama|Papal\s{0,4}States|Papua\s{0,4}New\s{0,4}Guinea|Paraguay|Peru|Philippines|Piedmont-Sardinia|Poland|Portugal|Qatar|Republic\s{0,4}of\s{0,4}Genoa|Republic\s{0,4}of\s{0,4}Korea|Republic\s{0,4}of\s{0,4}the\s{0,4}Congo|Romania|Russia|Rwanda|Saint\s{0,4}Kitts\s{0,4}and\s{0,4}Nevis|Saint\s{0,4}Lucia|Saint\s{0,4}Vincent\s{0,4}and\s{0,4}the\s{0,4}Grenadines|Samoa|San\s{0,4}Marino|Sao\s{0,4}Tome\s{0,4}and\s{0,4}Principe|Saudi\s{0,4}Arabia|Schaumburg-Lippe|Senegal|Serbia|Seychelles|Sierra\s{0,4}Leone|Singapore|Slovakia|Slovenia|Solomon\s{0,4}Islands|Somalia|South\s{0,4}Africa|South\s{0,4}Sudan|Spain|Sri\s{0,4}Lanka|Sudan|Suriname|Sweden|Switzerland|Syria|Tajikistan|Tanzania|Texas|Thailand|Timor-Leste|Togo|Tonga|Trinidad\s{0,4}and\s{0,4}Tobago|Tunisia|Turkey|Turkmenistan|Tuvalu|Two\s{0,4}Sicilies|Uganda|Ukraine|Union\s{0,4}of\s{0,4}Soviet\s{0,4}Socialist\s{0,4}Republics|United\s{0,4}Arab\s{0,4}Emirates|United\s{0,4}Kingdom|Uruguay|Uzbekistan|Vanuatu|Venezuela|Vietnam|Württemberg|Yemen|Zambia|Zimbabwe
Letters Finds all English letters A-Z and a-z. A, B, c, d [A-Za-z]+
Whitespace Finds all white-space characters.   \s+
Phone numbers Finds all Phone numbers that match the North America Numbering Plan (NANP). 1-234-456-7890 (\+1\s+)?\(?\d{3}\)?(\s{1,4}|-| )?\d{3}(-| )?\d{4}
Anything Finds anything in the text equivalent to (.|\s){1,500} in Regex.   (.|\s){1,500}
Anything but whitespace Finds anything in the text equivalent to \S+ in Regex.   \S+
Section headings Finds headings of a section that could help with segmentation. 1. Confidentiality, 7. Entire Agreement, Article 1 ^\s*(ARTICLE|Article|Section|SECTION)\s+(\d+|[XVILDCM]+)

Regular expression library

Following is a library of regular expressions to help you uncover key data points hidden deep in contracts across various review projects.

Contracts uses PCRE for it's regular expression engine. It has full support for Unicode characters, which includes Chinese, Japanese, and Korean (CJK) contracts.

  Possible results RegEx
Assignment will be assignable, will be assigned, will not be assignable, will not be assigned, shall be assigned, shall be assignable, shall not be assigned, shall not be assignable, may be assigned, may be assignable, may not be assigned, may not be assignable, may assign, may not assign. (?<highlight>will\s*(?:be\s)?assign(?:ed|able)?|shall\s*(?:not\s*be\s*|be\s*)assign(?:able\s*|ed\s*)|may\s*(?:not\s*be\s*|be\s*)assign(?:able|ed)|(?:may\s*not\s*|may\s*)assign|will\s*not\s*be\s*assign(?:ed|able)?)
Audit audit, audits, auditor, auditors, auditing, audited, audit team, audit teams, audit rights, audit privileges, right to audit, right for audit, privileges to audit, obligation to audit,audit obligation. (?<highlight>(?:obligations?\s*(?:to\s*|for\s*)|rights?\s*(?:to\s*|for\s*)?|privileges?\s*(?:to\s*|for\s*)?)?audit(?:s|ed|ing|ors?)?\s*(?:obligations?|teams?|rights?|privileges?)?)
Beneficiary contingent income beneficiary, primary income beneficiary, secondary income beneficiary, creditor income beneficiary, direct beneficiary, donee beneficiary, incidental beneficiary, third party beneficiary, benefactor, and all variations and conjugations. (?<highlight>contingent\s+income\s+beneficiary|primary\s+income\s+beneficiary|secondary\s+income\s+beneficiary|creditor\s+income\s+beneficiary|direct\s+beneficiary|donee\s+beneficiary|incidental\s+beneficiary|third\sparty\sbeneficiary|benef(?:actors?|iciar(?:y|ies)?))
Change in control change of control, changes of control, change in control, changes in control changes?(\s+?in|\s+?of)\s+?control
Civil authority language Language that may deal with business interruption coverage based on Civil Authority (\b(loss)\W+(?:\w+\W+){0,60}?\b(local authority|civil authority|military authority)\b)\W+?(?:\w+?\W+?){0,50}?(?:\.|\R\R)
Consent consent notice, consent notices, notice of consent, notices of consent, notice to consent, notices to consent, notice for consent, notices for consent, without consent, with consent, written consent, with the consent, without the consent, with written consent, without written consent, consent in writing, with consent in writing, without consent in writing, prior consent (?<highlight>(?:with(?:out)?\s*)?consent\s*(?:notices?|in\s*writing)|notices?\s*(?:of\s*|to\s*|for\s*)?consent|prior\s*consent|(?:with(?:out)?\s*)?(?:the\s*)?(?:writ(?:ten\s*|ing\s*)?(?:with(?:out)?\s*)?consent|(?:with(?:out)?\s*)?(?:the\s*)?consent))
Contract value Principal loan amounts. (\bissuance\s+?\w+(?:\w+\W+){1,20}\d+\s+\w+(?:\w+\W+){1,10}principal\b)|(\bloan\s+?\w+(?:\w+\W+){1,20}principal\b\s+\w+(?:\w+\W+){1,10}\d+)
Countries and states All US states and countries. (Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|Florida|Georgia|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New\s*Hampshire|New\s*Jersey|New\s*Mexico|New\s*York|North\s*Carolina|North\s*Dakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode\s*Island|South\s*Carolina|South\s*Dakota|Tennessee|Texas|Utah|Vermont|Virginia|Washington|West\s*Virginia|Wisconsin|Wyoming|District\s*of\s*Columbia|Afghanistan|Albania|Algeria|American\s*Samoa|Andorra|Angola|Anguilla|Antigua\s*&\s*Barbuda|Argentina|Armenia|Aruba|Australia|Austria|Azerbaijan|Bahamas|Bahrain|Bangladesh|Barbados|Belarus|Belgium|Belize|Benin|Bermuda|Bhutan|Bolivia|Bosnia\s*&\s*Herzegovina|Botswana|Brazil|British\s*Virgin\s*Islands|Virgin\s*Islands|Brunei|Bulgaria|Burkina\s*Faso|Burma|Burundi|Cambodia|Cameroon|Canada|Cape\s*Verde|Cayman\s*Islands|Central\s*African\s*Republic|Chad|Chile|China|Congo|Cook\s*Islands|Costa\s*Rica|Cote\s*d'Ivoire|Croatia|Cuba|Cyprus|Czech\s*Republic|Denmark|Djibouti|Dominica|Dominican\s*Republic|East\s*Timor|Ecuador|Egypt|El\s*Salvador|Equatorial\s*Guinea|Eritrea|Estonia|Ethiopia|Faroe\s*Islands|Fiji|Finland|France|French\s*Guiana|French\s*Polynesia|Gabon|The\s*Gambia|Gaza\s*Strip|Georgia|Germany|Ghana|Gibraltar|Greece|Greenland|Grenada|Guadeloupe|Guam|Guatemala|Guernsey|Guinea|Guinea\s*Bissau|Guinea.Bissau|Guyana|Haiti|Honduras|Hong\s*Kong|Hungary|Iceland|India|Indonesia|Iran|Iraq|Ireland|Isle\s*of\s*Man|Israel|Italy|Jamaica|Japan|Jersey|Jordan|Kazakhstan|Kenya|Kiribati|North\s*Korea|South\s*Korea|Kuwait|Kyrgyzstan|Laos|Latvia|Lebanon|Lesotho|Liberia|Libya|Liechtenstein|Lithuania|Luxembourg|Macau|Macedonia|Madagascar|Malawi|Malaysia|Maldives|Mali|Malta|Marshall\s*Islands|Martinique|Mauritania|Mauritius|Mayotte|Mexico|Micronesia|Moldova|Monaco|Mongolia|Montserrat|Morocco|Mozambique|Namibia|Nauru|Nepal|Netherlands|Netherlands\s*Antilles|New\s*Caledonia|New\s*Zealand|Nicaragua|Niger(?:ia)?|Mariana\s*Islands|Norway|Oman|Pakistan|Palau|Panama|Papua\s*New\s*Guinea|Paraguay|Peru|Philippines|Poland|Portugal|Puerto\s*Rico|Qatar|Reunion|Romania|Russia|Rwanda|Saint\s*Helena|Saint\s*Kitts\s*&\s*Nevis|Saint\s*Lucia|St\s*Pierre\s*&\s*Miquelon|Saint\s*Vincent\s*and\s*the\s*Grenadines|St\s*Vincent\s*and\s*the\s*Grenadines|Samoa|San\s*Marino|Sao\s*Tome\s*&\s*Principe|Sao\s*Tome\s*and\s*Principe|Saudi\s*Arabia|Senegal|Serbia|Seychelles|Sierra\s*Leone|Singapore|Slovakia|Slovenia|Solomon\s*Islands|Somalia|South\s*Africa|Spain|Sri\s*Lanka|Sudan|Suriname|Swaziland|Sweden|Switzerland|Syria|Taiwan|Tajikistan|Tanzania|Thailand|Togo|Tonga|Trinidad\s*&\s*Tobago|trinidad\s*and\s*tobago|Tunisia|Turkey|Turkmenistan|Turks\s*&\s*Caicos\s*Islands|Tuvalu|Uganda|Ukraine|United\s*Arab\s*Emirates|United\s*Arabic\s*Emirates|United\s*Kingdom|UK|United\s*States(?:\s*of\s*America)?|\s+USA\s+|\s+U\.S\.A\.\s+|Uruguay|Uzbekistan|Vanuatu|Venezuela|Vietnam|Virgin\s*Islands|Wallis\s*and\s*Futuna|West\s*Bank|Western\s*Sahara|Yemen|Zambia|Zimbabwe)
Date Dates in many different formats. Can be customized to find dates that come before or after specific keywords of text. (?x)(?(DEFINE)(?<month_string>(Jan(uary)?|Feb(ruary)?|Mar(ch)?|Apr(il)?|May|Jun(e)?|Jul(y)?|Aug(ust)?|Sep(tember)?|Oct(ober)?|Nov(ember)?|Dec(ember)?))(?<day_number>\d{1,2})(?<year_number>\d{2,4})(?<month_number>\d{1,2}))(?:(?<day_1>(?&day_number))(?:\s+|-)?(?<month_1>(?&month_string)),?(?:\s+|-)?(?<year_1>(?&year_number))|(?<day_2>(?&day_number))(?:st|nd|rd|th)?\s*day\s*of\s*(?<month_2>(?&month_string)),?\s*(?<year_2>(?&year_number))|(?<month_3>(?&month_string))(?:\s*|-)(?<day_3>(?&day_number))(?:st|nd|rd|th)?,?(?:\s+|-)?(?<year_3>(?&year_number))|(?<month_4>(?&month_string)),?\s+(?<year_4>(?&year_number)))|(?:(?&day_number)(?:\/|-)(?&month_number)(?:\/|-)(?&year_number)|(?&year_number)(?:\/|-)(?&month_number)(?:\/|-)(?&day_number))
Force Majeure clause Existence of a Force Majeure clause. (?s)(?<=\.)(?:[^\.]*?)((?:(?i)(accidents?|acts? of (war|god|public enemie)s?|adverse weather conditions?|armed conflicts?|blockades?|chemical contamination|cyclones?|earthquakes?|embargoes?|epidemics?|explosions?|fires?|floods?|government (regulations?|nationalization)|illegal strikes?|ionizing radiationexplosion|labor disputes?|lightning|plagues?|radioactive contaminations?|rebellions?|riots?|sabotage|storms?|terrorism|tornados?|tsunamis?|typhoons?),\s.*?){3,})[^\.]*
Force Majeure notification (days) Notice requirement, in days, for party to inform other of non-performance as a result of Force Majeure trigger. \bforce\s+?\bmajeure\s+?(event\s+?)?(?<highlight>(?:\w+?\W+?){1,10}?days)\s+?\w+?(?:\w+?\W+?){1,10}?(notice|notify|notifies|notification)
Force Majeure notification (entire notice section) Entire notice section of the Force Majeure clause. (?x)(?(DEFINE)(?'p1'(?:(?i)\Wforce\sm[a-z]+\W)))(?(DEFINE)(?'p2'\Wnoti[a-z]+\W))(?s)(?<=\.)(?:[^\.]*?)(?:(?P>p1)(?:(?s)[^\.]*?)(?P>p2)|(?P>p2)(?:(?s)[^\.]*?)(?P>p1))[^\.]*
Force Majeure triggers References to events that may trigger enforcement of Force Majeure clause. (?i)(accidents?|acts? of (war|god|public enemie)s?|adverse weather conditions?|armed conflicts?|blockades?|chemical contamination|cyclones?|earthquakes?|embargos?|epidemics?|explosions?|fires?|floods?|government (regulations?|nationalization)|(?:threats? of)? strikes?|ionizing radiationexplosion|labor disputes?|lightning|plagues?|radioactive contaminations?|rebellions?|riots?|sabotage|storms?|terrorism|tornados?|tsunamis?|typhoons?)
Governing law jurisdiction, applicable law, governing law, controlling law, governmental authority then displays a country or state per the spreadsheet located at the bottom of this page. (?:\b(governed|construed|accordance|interprete?d?)\W+(?:\w+\W+){0,9}?\blaws?\b)\W+(?:\w+\W+){1,20}?(?<highlight>(Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|Florida|Georgia|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New\s*Hampshire|New\s*Jersey|New\s*Mexico|New\s*York|North\s*Carolina|North\s*Dakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode\s*Island|South\s*Carolina|South\s*Dakota|Tennessee|Texas|Utah|Vermont|Virginia|Washington|West\s*Virginia|Wisconsin|Wyoming|District\s*of\s*Columbia|Afghanistan|Albania|Algeria|American\s*Samoa|Andorra|Angola|Anguilla|Antigua\s*&\s*Barbuda|Argentina|Armenia|Aruba|Australia|Austria|Azerbaijan|Bahamas|Bahrain|Bangladesh|Barbados|Belarus|Belgium|Belize|Benin|Bermuda|Bhutan|Bolivia|Bosnia\s*&\s*Herzegovina|Botswana|Brazil|British\s*Virgin\s*Islands|Virgin\s*Islands|Brunei|Bulgaria|Burkina\s*Faso|Burma|Burundi|Cambodia|Cameroon|Canada|Cape\s*Verde|Cayman\s*Islands|Central\s*African\s*Republic|Chad|Chile|China|Congo|Cook\s*Islands|Costa\s*Rica|Cote\s*d'Ivoire|Croatia|Cuba|Cyprus|Czech\s*Republic|Denmark|Djibouti|Dominica|Dominican\s*Republic|East\s*Timor|Ecuador|Egypt|El\s*Salvador|Equatorial\s*Guinea|Eritrea|Estonia|Ethiopia|Faroe\s*Islands|Fiji|Finland|France|French\s*Guiana|French\s*Polynesia|Gabon|The\s*Gambia|Gaza\s*Strip|Georgia|Germany|Ghana|Gibraltar|Greece|Greenland|Grenada|Guadeloupe|Guam|Guatemala|Guernsey|Guinea|Guinea\s*Bissau|Guinea-Bissau|Guyana|Haiti|Honduras|Hong\s*Kong|Hungary|Iceland|India|Indonesia|Iran|Iraq|Ireland|Isle\s*of\s*Man|Israel|Italy|Jamaica|Japan|Jersey|Jordan|Kazakhstan|Kenya|Kiribati|North\s*Korea|South\s*Korea|Kuwait|Kyrgyzstan|Laos|Latvia|Lebanon|Lesotho|Liberia|Libya|Liechtenstein|Lithuania|Luxembourg|Macau|Macedonia|Madagascar|Malawi|Malaysia|Maldives|Mali|Malta|Marshall\s*Islands|Martinique|Mauritania|Mauritius|Mayotte|Mexico|Micronesia|Moldova|Monaco|Mongolia|Montserrat|Morocco|Mozambique|Namibia|Nauru|Nepal|Netherlands|Netherlands\s*Antilles|New\s*Caledonia|New\s*Zealand|Nicaragua|Niger(?:ia)?|Mariana\s*Islands|Norway|Oman|Pakistan|Palau|Panama|Papua\s*New\s*Guinea|Paraguay|Peru|Philippines|Poland|Portugal|Puerto\s*Rico|Qatar|Reunion|Romania|Russia|Rwanda|Saint\s*Helena|Saint\s*Kitts\s*&\s*Nevis|Saint\s*Lucia|St\s*Pierre\s*&\s*Miquelon|Saint\s*Vincent\s*and\s*the\s*Grenadines|St\s*Vincent\s*and\s*the\s*Grenadines|Samoa|San\s*Marino|Sao\s*Tome\s*&\s*Principe|Sao\s*Tome\s*and\s*Principe|Saudi\s*Arabia|Senegal|Serbia|Seychelles|Sierra\s*Leone|Singapore|Slovakia|Slovenia|Solomon\s*Islands|Somalia|South\s*Africa|Spain|Sri\s*Lanka|Sudan|Suriname|Swaziland|Sweden|Switzerland|Syria|Taiwan|Tajikistan|Tanzania|Thailand|Togo|Tonga|Trinidad\s*&\s*Tobago|trinidad\s*and\s*tobago|Tunisia|Turkey|Turkmenistan|Turks\s*&\s*Caicos\s*Islands|Tuvalu|Uganda|Ukraine|United\s*Arab\s*Emirates|United\s*Arabic\s*Emirates|United\s*Kingdom|\bUK\b|United\s*States(?:\s*of\s*America)?|\s+USA\s+|\s+U\.S\.A\.\s+|Uruguay|Uzbekistan|Vanuatu|Venezuela|Vietnam|Virgin\s*Islands|Wallis\s*and\s*Futuna|West\s*Bank|Western\s*Sahara|Yemen|Zambia|Zimbabwe))
LIBOR impact LIBOR, LIBO rate, LIBOR rate, LIBOR loan, LIBO rate loan, LIBOR rate loan, Adjusted LIBOR, Adjusted LIBO rate, Adjusted LIBOR rate, London Interbank Offered Rate, London Inter-Bank Offered Rate, London Inter Bank Offered Rate, BBA LIBOR, ICE LIBOR, LIBOR Daily Floating Rate, LIBO Daily Floating Rate, Eurodollar rate, LIBOR Rate Election, LIBO Rate Election. (?<highlight>libor\s+?(?:rate\s+?)?(?:loan|election)|libo\s+?rate\s+?(?:loan|election)|libo\s+?daily\s+?floating\s+?rate|libor\s+?daily\s+?floating\s+?rate|(?:adjusted\s+?)?libor(?:\s+?rate(?:\s+?loan)?)?|(?:adjusted\s+?)?libo(?:\s+?rate(?:\s+?loan)?)?|london\s+?inter(?:.?|\-?)?bank\s+?offered\s+?rate|(?:bba|ice)\s+?libor|euro.?dollar\s+?rate)
LIBOR fallback terms (general) alternate fallback rate, alternate rate, alternate successor rate, alternative fallback rate, alternative rate, alternative reference rates, alternative successor rate fall back, fall back rate, fallback, fallback rate, inability to determine, rate fallback, rate is suspended, rate successor, rate suspension, successor, successor rate, suspend rate, suspension of rate, unlikely to be temporary. (?<highlight>fall(?:.)?back(?:\s+?rates?)?|successor(?:\s+?rates?)?|alternat(?:e|ive)\s+?(?:successor\s+?|reference\s+?|fall(?:.)?back\s+?)?rates?|suspen(?:d\s+?|sion\s+?)(?:of\s+?)?rates?|rate\s+?(?:is\s+?|becomes\s+?|will\s+?be\s+?)?suspe(?:nded|nsion)|rate\s+?(?:fall(?:.)?back|successor)|unlikely\s+?to\s+?be\s+?temporary|inability\s+?to\s+?determine)
LIBOR fallback language (specific) Tailored references to fallback language. (\bborrowing\s+\w+(?:\w+\W+){1,20}alternate\s+\w+(?:\w+\W+){1,20}libor?\s+\w+(?:\w+\W+){1,20}administrative\b)|(\bsuspension\s+\w+(?:\w+\W+){1,20}libor?\s+\w+(?:\w+\W+){1,20}provisions\b)
LIBOR obligations Calculation agent, option to determine, option to establish, option to propose, option to elect, option to vote, required lenders, required parties, cost of fund, extend rate, rate extension, maturity date extension, extend maturity date. calculation\s*agent|option\s*to\s*determine|option\s*to\s*establish|option\s*to\s*propose|option\s*to\s*vote|prepayments?|required\s*lenders?|convert\s*rates?|cost\s*of\s*funds?|rate\s*extension|increased\s*cost|maturity\s*date|unlikely\s*to\s*be\s*temporary|restrictions\s*on\s*repayment|repayment\s*restrictions|restrictions\s*to\s*repay
LIBOR reference References to a LIBOR rate. \bloans\s+?\w+(?:\w+\W+){1,20}interest\b\s+?\w+(?:\w+\W+){1,20}adjusted\s+?\blibor?
Notification address In contracts that define events where either party may not be able to fulfill their commitments, there is often a section to notify the other party of such an event. These clauses often list the requirement of written notice to be delivered to a specific address. (?<=Address:|Company:|Contractor:|Grant:|Licensee:|Notice:|Notify:|Contractor\sshall\sbe:|Company\sshall\sbe:)\s+(?<highlight>(.*\R){3,8}?)(\R\R?|Company:\s|Contractor:\s|Licensee:\s|Notice:\s|Notify:\s)
Maturity Maturity, Maturity Date followed by any identified date that ensues. (?:(?:(?:maturity(?:\s+?(?:date\s*o?f?\s*?)?(?:\s+?|\:(?:\s+(?:\R+|\r+)?|\;(?:\s+?|\r{1,2})?|\.(?:\s+?|\r{1,2})|\,(?:\s+?|\r{1,2}))))))|(?:matur(?:e|ing|ed|ity)(?:\s+?of|\s+?on)(?:\s+?|\:\s+?|\r{1}?|\r{1,2})|(?:\s+?on(?:\s+?|\r{1,2})?)))(?<highlight>(?:January|(February|March|April|May|June|July|August|September|October|November|December))\s+?\d+(?:th)?\,?\s+?\d{2,4})
Party address Addresses and locations of parties, often in the introduction of the contract. Follows the basic format "Example Company having its principal place of business at 1969 Upper Water Street, Suite 900, Halifax, NS, B3J 3N2 (hereinafter referred to as “Contractor”)". The underline represents the regex result. (office|place of business)(.|\R){0,50}(\bat\b|\bin\b)(?<highlight>[\W\w]{5,250}?)(?=(\(\bhere|\brefer|\(("|“|')|\band\b))
Production end (oil and gas) ending production, abandon production, ceasing production, closing production, conclude production, concluding production, suspend production, market the production, suspending production, discontinuing production, ending production, halt production, halting production, interrupt production, terminate production, market product, market producing, market production, marketing production, marketed production, interrupting production, pause production, pausing production, suspending production, non producing, non production, non-producing, non-production , production abandonment, production closure, production conclusion, production discontinuation, production end, production halt, production interruption, production pausing, production stoppage, production suspension, production termination, abandonment of production, ceasing to produce, cessation of production, cessation to produce, close of production, conclusion of production, suspension of production, termination of production, discontinuance of production, discontinuation of production, interruption of production, market the product, market the production, marketing production, marketing the production (?<highlight>end(?:ing)?\s*(?:the\s*)?produc(?:ing|tion)|suspend(?:ing)?(?:the\s*)?\s*produc(?:ing|tion)|abandon(?:ing)?(?:the\s*)?\s*produc(?:ing|tion)|ceas(?:e|ing)?(?:the\s*)?\s*produc(?:ing|tion)|clos(?:e|ing)?\s*(?:the\s*)?produc(?:ing|tion)|conclud(?:e|ing)?\s*(?:the\s*)?produc(?:ing|tion)|discontinu(?:e|ing)?\s*(?:the\s*)?produc(?:ing|tion)|halt(?:ing)?\s*(?:the\s*)?produc(?:ing|tion)|interrupt(?:ing)?\s*(?:the\s*)?produc(?:ing|tion)|terminat(?:e|ing|ion\s*)?\s*(?:the\s*)?produc(?:ing|tion)|market(?:ed|ing)?\s*(?:the\s*)?produc(?:ing|tion)?|paus(?:e|ing)?\s*(?:the\s*)?produc(?:ing|tion)|production\s*suspension|production\s*termination|production\s*abandonment|production\s*closure|production\s*conclusion|production\s*discontinuation|production\s*end|production\s*halt|production\s*interruption|production\s*paus(?:e|ing)?|production\s*stoppage|abandonment\s*of\s*production|ceasing\s*the\s*production|ceasing\s*to\s*produce|cessation\s*(?:of\s*|to\s*)?produc(?:e|tion)?|close\s*of\s*production|conclusion\s*of\s*production|suspension\s*of\s*production|termination\s*of\s*production|discontinuance\s*of\s*production|discontinuation\s*of\s*production|interruption\s*of\s*production|market\s*the\s*production|marketing\s*the\s*production|market\s*the\s*product|non(?:\s|.)?produc(?:ing|tion))
Mineral/surface rights and easements (oil and gas) For ‘Surface/Mineral Rights’ - minerals rights, surface rights, subsurface rights, surface rights, sub-surface rights, mineral use, subsurface use, surface use, surface use restrictions. For ‘Easements’ - right-of-way, easements of way, easements of support easements of light and air. minerals?\s*rights?|mineral\s*uses?|surface\s*?rights?|usage\s*restrictions?|sub.?surface\s*rights|sub.?surface\s*use|surface\s*use\s*restrictions?|surface\s*use|right.?of.?way|easements?\s*of\s*way|easements?\s*of\s*support|easements?\s*of\s*light\s*and\s*air
Risk of loss -buyer References to risk of loss for buyer deliver(y|ies).{0,200}risk of loss|risk of loss.{0,200}deliver(y|ies)|risk of loss.{0,200}buyers?|buyers?.{0,200}risk of loss|titles?.{0,200}risk of loss|risk of loss.{0,200}titles?| transfers?.{0,200}risk of loss|risk of loss.{0,200}transfers?| transfers?.{0,200}distributors?|risk of loss.{0,200}distributors?
Risk of loss - seller References to risk of loss for seller inventor(y|ies).{0,200}risk of loss|risk of loss.{0,200}inventor(y|ies)|risk of loss.{0,200}sellers?|sellers?.{0,200}risk of loss
Security deposit References to security deposit securit(?:y|ies)\s*deposits?|letters?\s*(?:of\s*)?credits?(.*)(\R)
Square footage References to square footage \d+\s+([Ss]q\.?\s*[Ff]t\.?|([Ss]quare\s+[Ff](ootage|eet)))
Termination termination date, termination dates, termination notice, termination notices, termination rights, termination right, right to terminate, rights to terminate, right of termination, rights of termination, right for termination, rights for termination, notice to terminate, notice of termination, notice for termination, term and termination, terms and termination, date of termination, date to terminate, notice of termination termination\s*(?:dates?|rights?|notices?)|rights?\s*(?:to|of|for)\s*terminat(?:e|ion)|(?:dates?|terms?|notices?)\s*(?:to|of|for|and)\s*terminat(?:e|ion)
Unitization and pooling (oil and gas) joint leases, unitization, unit, uniting, communitize, communitized, communitization, production sharing, combining adjoining leased tracts, combining leased tracts, pooling, pooling units, pooled units, pooling order, pools unit. pool(?:s|ed|ing)?\s*unit(?:s|ed|ing)?|pool(?:ed|ing)?\s*orders?|joint\s*leases|unitiz(?:ed?|ation)|communit(?:ing|ized?|ization)?|production\s*sharing|combine?(?:ing)?\s*leased?\s*tracts?|combine?(?:ing)?\s*adjoining\s*leased?\s*tracts?
Unitization and pooling type (oil and gas) voluntary pooled units, compulsory units, statutory units, forced pooled units, drilling units, proration units, field wide units, field wide recovery, field wide recovery units, enhanced recovery units, specially defined units, recovery units, enhanced recovery unit, enhanced unit. voluntary\s*pooling|voluntary\s*pooling\s*units?|forced\s*pooled\s*units?|compulsory\s*units|statutory\s*units|drill(?:ed|ing)?\s*units?|proration\s*units\s*|field.?wide\s*recovery\s*(?:units?)?|field.?wide\s*(?:units?)?|enhanced\s*recovery\s*units?|specially\s*defined\s*units?|recovery\s*units?|enhanced\s*units?

Preview regular expression results

Regular Expression Preview is a way to quickly assess how a regular expression you've created in the viewer will perform on other documents beyond the one you’re currently viewing.

For example, let's say your regular expression is doing really well at finding Governing Law on the document you're viewing, but it fails to find this data in many other documents. Ideally, you would want to know this up front when editing your regular expression so that you can make adjustments to return more matches across more documents.

Run preview

To preview regex results:

  1. When creating or editing a regular expression in the search bar, click Save.
  2. To the right of the options for your regular expression, click Preview Results On Other Documents.
  3. Select a saved search. Contracts will run the regular expression on the first 1000 documents.
    You can change this amount by going to the Instance Settings tab, filtering for the RegexResultsDocLimit instance setting, and changing the 1000 value to a different number.

View the results of your preview. Summary stats appear at the top of your list. The list will show all results across the saved search sample and group them by document. It also shows information about the section heading and type in which each result was found. Click a control number to open up that document in a new tab.
An image of regex results previewed on other documents.

You can click the number button to toggle between documents with hits and documents with no hits summary stats. You can export the list to excel by clicking Export.

Close the preview when you are done.

Preview regular expression segmentation

Segmentation Preview is a way to quickly assess how a regular expression you've created in the viewer will segment the document you are on. You can cycle through documents in your queue to preview segmentation just as you would if you were in the main review interface.

For example, let's say you have a regular expression that you think is good at segmenting documents with a particular section heading structure. You can quickly test that theory by previewing segmentation instead of having to create the regular expression, model, profile, and analysis set to run analysis and assess results.

Click the preview segmentation button to demo how your regular expression will segment the document without leaving the viewer.

Run segmentation preview

To preview regex segmentation:

  1. When creating or editing a regular expression in the search bar, expand the Regular Expression Details panel.
  2. Click Preview Segmentation.
  3. In the pop-up, observe the sections in the left pane and click them to navigate the contract preview. Change your parsing flag and see how the results update in real time.
    For more information on parsing flags, see Understanding parsing flags.
    An image of preview segmentation.
  4. If you are happy with the results, segment the document by clicking Analyze. This will create new sections based on your preview and will not automatically delete any existing sections generated for the parent document.

Segment documents using regular expressions

You can segment documents into sections using regular expressions. See Segment documents using regular expressions for more details.