Skip to main content

Using the formatter, for an email string like “SOD_[name]_-3282-25 between XXXX Law Offices, P.C. and [name] is Signed and Filed”

 

i want to split the text and only take out the name, mainly the 2nd occurrence. Typicaly, i would use formatter to split texts “between XXX Law Offices, P.C. and” I would then get the output “[name] is Signed and Filed” then a 2nd formatter step for [space]… just so i can pull out the client’s name. Is there a single step that can basically say what is after this “x” and before “y”?

x= between XXX Law Offices, P.C. and

y= [name] is Signed and Filed

 

requested output= [name]

 

****Formatting for the first name occurrence changes depends on the PDF thats being signed, so it needs to be the last [name] occurrence that is consistent.**

 

 

SIDE NOTE: Does the formatter take up tasks? Can i have 500 and it not mattter? I dont mind to have 500 steps if it wont cost me a task

Hi ​@DBercccssss12 

Info about Zap step limits: https://help.zapier.com/hc/en-us/articles/8496181445261-Zap-limits

 

Info about native Zap apps and Task usage in Zap Runs: 

 

Options:


Hi there, ​@DBercccssss12 👋

Just came across this and wanted to check how you got on—did the guides Troy shared help to point you in the right direction, or are you still stuck at all?

Look forward to hearing from you! 


Not really, and. i have no idea on what to add for a pattern. what does the format look like?


Sorry to hear that, ​@DBercccssss12. Happy to give some examples of the correct format to use for the pattern! 🙂

To extract [name] which exists between two underscores (_) you would use this sort of extract pattern: (?<=x)(.*?)(?=y) and replace the x and y with the specific characters/words that appear before and after the value you want to extract.

For example, the pattern (?<=_)(.*?)(?=_) shown below:

87b5e1bd420fcae8a7a56a821846cfbc.png

Would output the first instance of [name] that appears:

a86bb5538eebbf435ddda1d6ff0955bd.png

And for the second instance of [name], you could have another Formatter that uses this pattern: (?<=Law Offices, P.C. and )(.*?)(?= is Signed)

That said, if the names you want to extract always appear within square brackets, it would be more efficient to have just one Formatter action that using a different pattern to find all values inside square brackets: \[(.*?)\] 

Make sure that it’s also set it to find all matches like so:
292cd3c136a8f2dc010503d58ba7393d.png

That should then give you both names:

19e2fe24fcb79e4ed060b18478421ee3.png

 
Note: If you need it to include the square brackets in the output (e.g. [name] rather than just name) you can use this version of the pattern instead: \[[^\]]*]

You can learn more about how to use regex patterns in Formatter to extract different values here: 

 

Can you give the above a try and let us know how it goes?