Jump 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.

Importing/parsing data from email text

Featured Replies

  • Newbies

Brief background:

Webhost backed up server - and after upgrading OS, data from mysql was not restored... 20,000+ records lost. UGH! Says anything that can be restored is...

After moving to a new host :B ... realized I had received emails from each form submission. Was able to dump them to text files. Using a small group, imported each text file into a seperate record. Entire email is in one field. (To, From, Subject, Date & Body)

Have been playing for several days trying to parse the data into individual emails so I can get the newsletters back up & runnning. Played with Middle, Position, etc... but having trouble figuring out how to capture everything from the field name to the end of the line...

Have FM7/8 osx 10.4 - and not opposed to using AS/automator, etc.

Thanks in advance!

-Jeff

Here is a sample record:

****************************

Someone just subscribed to your autoresponder called "25secrets".

Their e-mail address is [email protected]

Here are the contents of the subscription form:

arpcustom_bdday - 31

arpcustom_bdmonth - 08

arpcustom_bdyear - 1998

arpcustom_childfirst - Daniel

arpcustom_childlast - Smith

capitals - 1

email - [email protected]

extra_ar -

first_name - Mommy

format - H

id - 2

last_name - Smith

title - Ms.

tracking_tag - enter

** END OF FORM CONTENTS **

Here's an example that extracts the last name parameter:

Let ( [

start = Position ( email ; "last_name" ; 1 ; 1 ) + 12 ;

end = Position ( email ; ¶ ; start ; 1 )

] ;

Middle ( email ; start ; end - start )

)

Or, in a more general form:

Let ( [

prefix = "last_name - " ;

start = Position ( email ; prefix ; 1 ; 1 ) + Length ( prefix ) ;

end = Position ( email ; ¶ ; start ; 1 )

] ;

Middle ( email ; start ; end - start )

)

Here you can change the prefix, and it will extract that parameter.

  • Author
  • Newbies

THANK YOU, THANK YOU, THANK YOU!

That did the trick!

How can I thank you?!?

You already did - three times...

Create an account or sign in to comment

Important Information

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

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.