Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Case Caption and the RegEx function

Biernt
6 - Meteoroid

Hello,

 

I've tried looking around the forum for a solution to this problem, but I couldn't find anyone dealing with legal case captions.

 

I'm dealing with a data set consisting of [plaintiff] v. [defendant]. The problem that I'm faced with is the length of the plaintiff's name varies, for example:

 

John Doe Jr. v. Defendant

John v. Defendant

John Doe v. Defendant

 

I've used (^[[:alpha:]]*\s[[:alpha:]]*\s[[:alpha:]]*) to parse the plaintiff's name, however, this runs into issues of including the "v" for plaintiff with 2 words as their name, and part of the defendant for plaintiffs who only have 1 word names listed. 

2 REPLIES 2
TerryT
Alteryx Alumni (Retired)

Hope it helps:  (.*?)\s+v\.\s+(.*)

 

TerryT_0-1596035464354.png

 

Biernt
6 - Meteoroid

Thank you, Terry! This solved the issue 

Labels
Top Solution Authors