Hello!
There are some solutions out here already, but I can't quite get mine to do exactly as needed.
I am trying to extract an email, and on occasion there is more than one, but also another email address I don't want. Data would look something like this:
Email Address: sjefferson@gmail.com
(1) Beneficiary Name: John Smith
(1) Beneficiary Street Address: 123 Main St
(1) Beneficiary Street City: Anytown
(1) Beneficiary Email: jsmith@gmail.com
(2) Beneficiary Email: ljones@aol.com
Results I need are jsmith@gmail.com and ljones@aol.com But, NOT the sjefferson@gmail.com
I tried: Beneficiary email:(.+@\w+[\.\w?]+)
But that would only pull 1 email and if the one labeled Email Address was listed first, it pulled that one.
Thank you in advance,
Kim
Solved! Go to Solution.
Try this out!
Email:\s(.+)
Its taking all characters after Email: -- side note here, the website regex101 is a very helpful resource as you're testing out your regex
If this provided a solution, make sure to mark it as solution to help other members out!
Thanks
@kas ,
As @CarliE pointed out, you can simplify your expression to pick up all of the emails. The reason your expression isn't working for the first email address is the word "Beneficiary" in the expression. If you simplify it to just look for the word email and add .* before the : , you will pick up all three. Try this modified expression:
Email.*:\s(.+@\w+[\.\w?]+)
Hey @kas,
Not sure how your data is structured but here's two examples of how I would get the email addresses:
Hello,
Thank you for the quick response...I should have added a bit more to my data set - your Regex pulled too much.
Email Address: sjefferson@gmail.com
(1) Beneficiary Name: John Smith
(1) Beneficiary Street Address: 123 Main St
(1) Beneficiary Street City: Anytown
(1) Beneficiary Email: jsmith@gmail.com
(2) Beneficiary Email: ljones@aol.com
(1) Amount: $xxx
(2) Amount: $xxx
Etc...there is more misc stuff afterwards...
thank you!
Yes, sorry it wasn't clear in my original question...I only want the ones that start with Beneficiary.
Thank you!
Can't find the option to edit my original question...sorry
@kas my solution should give you what you need :)
Let me know if you have any questions and be sure to mark the solution!
Thanks
Yes, but I don't want everything after the email address...there is additional information and the emails aren't listed one after the other.
Thank you though.
Email:\s(\w+@\w+.\w+)
This new solution didnt work?
1. Add a record ID
2. Split to rows with \n delimiter
3. Regex Parse with the expression above
4. Filter out nulls if needed
User | Count |
---|---|
52 | |
27 | |
25 | |
24 | |
21 |