Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Extracting Email Addresses

Featured Replies

I'm trying to automate the process of extracting email addresses out of a text field. I have acheived this by locating the '@' and then working backwards and forwards of this to extract the address depending on whether there are spaces or carraige returns (or a combination) before and after the address. The problem I am having is that sometimes there may be tabs either before or after (or both) the address which is causing extra data to be extracted. How can I check to see if this is so - or am I complicating the whole procedure....God I'm confused!!!!confused.gif

Cheers

Nick

You'll need one global number field for counter and one text global for result

freeze window

set field [gCounter (PatternCount(textField, "@")]

if[gCounter]

Loop

set field [gResult,gResult & "

  • Author

Cheers Dj

Nick

i've bulk extracted email before and found that a lot of them had problems because users didn't enter them properly. this is not directly related to your question, but perhaps you have some use for the following ugly calc field which validates an email address format:

If( WordCount(email) < 2 or PatternCount(email, not "@") or PatternCount(Right(email, Length(email) - Position(email, "@", 1, 1)), ".") = 0 or PatternCount(Trim(email), " "),

"Invalid email address!", "")

  • 7 months later...

This is what I use to validate the Email entry.

PatternCount(eMail, "

  • 4 months later...

Here's an update:

PatternCount(eMail, "

This doesn't specifically apply to this question, here are some of general tips about extracting text that I often use to simplify things:

1. Pre-process the text field using the substitute function to replace tabs, commas, periods and other punctuation, with spaces before you do your text search.

2. Concatenate onto the beginning and/or end of your text, a space or

BobWeaver said:

1. Pre-process the text field using the substitute function to replace tabs,

What character is used for scripting the Tab action ?

The tab character doesn't exist in FileMaker, you need to copy a Tab from a text editor and paste it in. Several developers create a g_tab field just for that purpose. That way you can use it in any calculation you need.

Substitute(YOURFIELD, " ", "") would remove the tab.

There is a tab between the first set of "", which I copied and pasted out of my field g_tab.

Or

Substitute(YOURFIELD, ":", ":" & g_tab) would a tab to every instence of : in your text:

HTH

Lee

cool.gif

Earlier, I've tried

Trim(Substitute(Substitute(Substitute(ExtractedString; "

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.