Hello,
I have a bunch of data and need to extract the first 3 words after the words DOF or Met or Clerk.
For example:
DOF Monica Harris Lalala - Monica Harris Lalala
Met Forrest Gump Hello Goodbye - Forrest Gump Hello
And so with Clerk.
Does anyone know how to achieve this?
Thanks!
Hey @insomned, quite a few ways of doing this. One of them you could use a RegEx tool in Parse mode, with the following expression:
(?:DOF|Met|Clark)\s((?:[^\s]+\s){2}[^\s]+)
Thank you, and how do I parse 2 first words? Thanks!
Hey @insomned, could just change the {2} to {1} if you only wanted two words after those 3:
(?:DOF|Met|Clark)\s((?:[^\s]+\s){1}[^\s]+)
User | Count |
---|---|
107 | |
82 | |
69 | |
54 | |
40 |