How to extract email address from string field with a custom function?

How to extract email address from string field with a custom function?

Hi Support,

Current Functionality
I have a flow in Zoho Flow that receives information via a JSON webhook POST and then updates/creates records using this information into Zoho CRM. A specific piece of that information is "comments" which is pushed to a field in Zoho CRM called "comments".

What I Want
An example of the comments string field below:



I want to be able to extract the email address from the comments field and place it into the email field (or any other alternative as long as I can extract the email address) which will lookup and associate any accounts and contacts. How can I do this with a script? Maybe a script that can extract all the text between the commas (,) which have an "@" sign?

N.B. The information in the comments can come in any order.

Let me know what is possible and thanks.

    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方