Extracting Info from text and split to Bundles

I have this text string: ]\n\n * Michael Lee Abrams [https://imageserver.floridabar.org/Images/1/10/0171101p.jpg] [https://www.floridabar.org/directories/find-mbr/profile/?num=171101] Michael Lee Abrams [https://www.floridabar.org/directories/find-mbr/profile/?num=171101]\n \n \"Mike\"\n \n Bar #171101\n \n Eligible to Practice Law in Florida Michael L. Abrams, Esq.\n 9740 NW 35th St\n Hollywood, FL 33024-8002\n \n Office: 305-621-5600 [tel:305-621-5600]\n Cell: 954-559-6453 [tel:954-559-6453]\n Fax: 954-433-3745\n michaelabramslaw@gmail.com [michaelabramslaw@gmail.com]\n \n \n \n * James Boyt Abril [https://www.floridabar.org/app/plugins/tfb/public/images/no_profile.png] [https://www.floridabar.org/directories/find-mbr/profile/?num=731412] James Boyt Abril [https://www.floridabar.org/directories/find-mbr/profile/?num=731412]\n \n Bar #731412\n \n Eligible to Practice Law in Florida Balocco & Abril, PLLC\n 4332 E Tradewinds Ave\n Lauderdale By the Sea, FL 33308-5010\n \n Office: 954-399-4278 [tel:954-399-4278]\n Fax: 954-399-4278\n jabril@abrillaw.net [jabril@abrillaw.net]\n \n \n \n * Marshall A Adams [https://imageserver.floridabar.org/Images/6/42/0712426p.jpg] [https://www.floridabar.org/directories/find-mbr/profile/?num=712426] Marshall A Adams [https://www.floridabar.org/directories/find-mbr/profile/?num=712426]\n \n Bar #712426\n \n Eligible to Practice Law in Florida Lubell & Rosen\n 200 S Andrews Ave Ste 900\n Ft Lauderdale, FL 33301-2068\n \n Office: 954-880-9500 [tel:954-880-9500]\n Cell: 954-880-9500 [tel:954-880-9500]\n Fax: 954-755-2993\n maa@lubellrosen.com [maa@lubellrosen.com]\n \n \n \n * Sandra Durloo Adams [https://www.floridabar.org/app/plugins/tfb/public/images/no_profile.png] [https://www.floridabar.org/directories/find-mbr/profile/?num=41467] Sandra Durloo Adams [https://www.floridabar.org/directories/find-mbr/profile/?num=41467]\n \n Bar #41467\n \n Eligible to Practice Law in Florida Baker Donelson\n 864 NW 123rd Dr\n Coral Springs, FL 33071-5086\n \n Office: 954-768-1608 [tel:954-768-1608]\n Cell: 502-716-0059 [tel:502-716-0059]\n sadams@bakerdonelson.com [sadams@bakerdonelson.com]\n \n \n \n * Tracy Jacqueline Adams [https://imageserver.floridabar.org/Images/0/39/0004390p.jpg] [https://www.floridabar.org/directories/find-mbr/profile/?num=4390] Tracy Jacqueline Adams [https://www.floridabar.org/directories/find-mbr/profile/?num=4390]\n \n Bar #4390\n \n Eligible to Practice Law in Florida Adams Attorneys LLC\n 2900 NE 21st Ter\n Fort Lauderdale, FL 33306-1218\n \n Office: 754-779-7177 [tel:754-779-7177]\n Cell: 305-709-9927 [tel:305-709-9927]\n kwlaw@adamsattorneysllc.com [kwlaw@adamsattorneysllc.com]\n \n \n \n * Marci A Adler [https://imageserver.floridabar.org/Images/7/64/0990647p.jpg] [https://www.floridabar.org/directories/find-mbr/profile/?num=990647] Marci A Adler [https://www.floridabar.org/directories/find-mbr/profile/?num=990647]\n \n Bar #990647\n \n Eligible to Practice Law in Florida Marci A. Adler, Attorney at Law, P.A.\n 8958 W State Road 84 # 127\n Davie, FL 33324-4457\n \n Office: 954-296-9025 [tel:954-296-9025]\n Cell: 954-296-9025 [tel:954-296-9025]\n marci@marciadlerpa.com [marci@marciadlerpa.com]\n \n \n \n "

How do I extract each Attorney details for example: Michael Lee Abrams, 9740 NW 35th St, Hollywood, FL 33024, Office: 305-621-5600, Cell: 954-559-6453, michaelabramslaw@gmail.com

I then need a separate bundle for each so that I can add it to a row in Sheets.

Thanks!
Francois

P.S. There is a * Character between each attorney.

Please share the exact text in a formatted code block so that I know nothing has changed when you posted the text.

To do this, please re-copy and paste it again here, but this time

  • Either add three backticks ``` before and after the text, like this:

    ```
    content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Alternatively you can paste it in a text file with extension “.txt” and upload it here for best results.

Following these steps will allow others to assist you here. Thanks!

2 Likes

SampleText.txt (27.3 KB)

Thank you!

Welcome to the Make community!

Screenshot_2024-02-20_151445

You can use a Text Parser “Match Pattern” module with this Pattern (regular expression):

\*\s{2}(?<name>[^[]+)\s\[[\w\W]+?(?:\\"(?<nickname>[^\\]+)\\"[\w\W]+?)?Bar #(?<bar>\d+)[\w\W]+?Eligible to Practice Law in (?<practice>[\w\W]+?)\\n\s+(?<address1>[^\\]+?)\\n\s+(?:(?<address2>[^:]+?)\\n\s+)?(?:\\n\s+Office: (?<office>[\d-]+)[\w\W]+?)?(?:\\n\s+Cell: (?<cell>[\d-]+)[\w\W]+?)?(?:\\n\s+Fax: (?<fax>[\d-]+))?\\n\s+(?<email>[^@]+@[^.]+\.\S+)

Proof https://regex101.com/r/SSC8Es

Important Info

  • :warning: Global match must be set to YES!

Screenshot

Output


etc.


For more information, see Text Parser in the Make Help Center:

Match Pattern
The Match pattern module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a regular expression (aka regex or regexp), which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.

Hope this helps!

2 Likes

You are amazing! How even do you know this?!! : )

Thank you so much!

My data from the previous module is now different. How do I remove the first few lines to get to the first attorney?


  1. ↩︎

ExtraText.txt (1.1 KB)

Actually, your regex works whether that text is there or not. It works in Regex but not in Make.com

Francois

I think I have messed this up, because I added multiple match pattern modules to clean the text.

Here is the Full Text that I parsed from HTML to text after the scrape. It seems like your expression still works here, but only in Regex.

Francois

I appreciate your help!
FullText.txt (64.3 KB)

This is so frustrating!!!

I created a Tools - Set Variable and Copied the Output from HTML to Text.

Then used a Match Pattern using your Regex and it works!!!

But, When I do the following the Output for the match Pattern is just empty? What’s going on??

Scrape - Html to Text - Match Pattern


No Output


You have some more guidance for me?