RegEx Search for Quotations
top of page

RegEx Search for Quotations


You can use a RegEx lookahead, lookbehind script to find text between parentheses, brakets, quotation marks, or other characters. See this example with curly quotes.

(?<=\“)(.*?)(?=\”)

[for each step see the numbered images below]

1. Start with a brief or other legal document which uses curly quotes so you can find where quotations begin and end.

2. Save the content of your searchable PDF or Word document to a .txt file.

3. Using PowerGrep select the text file, and then set it up for:

a. Action type: collect data

b. Do not filter files.

c. Do not section files.

d. Search type: regular expression.

e. Target file creation: Save results into a single file.

f. Between collected text: Line break.

4. In the search box enter the RegEx code:

(?<=\“)(.*?)(?=\”)

. . . and then just put:

\0

in the Collect box.

5. Click 'Collect' on the top toolbar and PowerGrep will highlight the results in the text file.

6. You'll end up with a separate text file with just the quotations from the original PDF.


Sean O'Shea has more than 20 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.

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page