Fidel from Brisbane has posted a very useful PowerShell script here, that you can use to run a regular expression search through a text file and extract only the matching hits.

When used with the RegEx search for Bates numbers discussed last night, it can be used to automatically extract a complete list of Bates numbers in any text file.

So if you start with a text file that looks like this:

. . . with Bates numbers at the end of each paragraph, you can run this PowerShell script:

select-string -Path C:\foofolder\input.txt -Pattern "(\b\w{1,10}(-|_|\s?)[0-9]{5,12}\b|\b\w{1,10}(-|_|\s?)\b\w{1,10}(-|_|\s?)[0-9]{5,12}\b)" -AllMatches | % { $_.Matches } | select-object Value -unique | sort-object Value > C:\foofolder\output2.txt

to pull out the Bates numbers. Note that you need to specify the path of your text file at:

select-string -Path C:\foofolder\input.txt

. . . put in the Regex in quotes at:

-Pattern "(\b\w{1,10}(-|_|\s?)[0-9]{5,12}\b|\b\w{1,10}(-|_|\s?)\b\w{1,10}(-|_|\s?)[0-9]{5,12}\b)" -AllMatches

. . . and then specify an output file at the end:

sort-object Value > C:\foofolder\output2.txt

You should end up with a text file that just lists the Bates numbers and has them sorted as well!

11 views0 comments

The world apparently needs a good RegEx search for Bates numbers in a variety of formats. When I tried today to find one by running a Google search, I only found a lame attempt in the Relativity Search Guide which requires the entry of specific Bates prefix:

Here's a first attempt at a RegEx pattern which will account for Bates numbers with different Bates prefixes that contain hyphens and underscores between segments of the letter prefix, and which contain between 5 and 12 digits.


The search is structured to search for between 1-10 letters at the beginning of a word boundary:


. . . it then searches for either a hyphen, underscore or zero or one whitespace:


. . . between the letter prefix and 5 to 12 digit number which is at the end of a word:


The search then looks for instances where the Bates letter prefix is split in two parts, separated by a hyphen, underscore, or zero, or one whitespace:


Obviously, it's possible to imagine additional Bates number formats, but this should find most and can easily be edited to account for more variations in the letter prefix length or number of digits.

23 views0 comments

Service Level Agreements are often signed between law firms or client, and e-discovery vendors. The agreements will be based on the vendor providing services to a client.

If the service provider engages a third party to provide the necessary service, this new agreement may be referred to as a OLA, or an operational level agreement. This should track how server resources are dedicated to new project.

SLAs may allow for modifications at fixed periods of time. The agreement should specify detail the services to be provided. The SLA should address how interruptions in the vendor’s services will compensated for.

An underpinning contract (UC) will track how the third party provides services to the vendor.

7 views0 comments

Sean O'Shea has more than 15 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.


All content provided on this blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.


This policy is subject to change at any time.