Hi
Could some please explain how to get only the zip code off a line
It looks like this
I go the 987 EUCLID AVE and the MIAMI, FL But can not grab the zip But it always FL then zip Fl never changes
THXS very much
Could some please explain how to get only the zip code off a line
It looks like this
Property Address: 987 EUCLID AVE
MIAMI, FL 33139-8787
I go the 987 EUCLID AVE and the MIAMI, FL But can not grab the zip But it always FL then zip Fl never changes
THXS very much
Hi,
The easiest way is to use a "simple email parser" where the "start after" value is the wildcard expression: *, FL and the "continues until" value is end of line:
Also, it can be done with a expression match email parser. A bit more complex but also possible. The regular expression is: FL\s*(?'postal_code'\d*-\d*)
It is also possible with a script-based email parser. This is the most complex way:
[syntax=csharp]
using EmailAndParser.ScriptingInterface;
using System.Collections.Specialized;
using System.Net.Mail;
public class MyScriptBasedEmailParser : ScriptBasedParser
{
public override NameValueCollection ParseEmail(MailMessage msg)
{
// This will be the fields that this script-based email parser will return
NameValueCollection returned_fields = new NameValueCollection();
// the email body is
string email_body = msg.Body;
// Get the position of "FL" in the email body
int position = email_body.IndexOf("FL");
string s;
if (position > 0)
s = email_body.Substring(position+2);
else
s = ""; // FL not found
returned_fields.Add("postal_code", s);
return (returned_fields);
}
}
[/syntax]
The easiest way is to use a "simple email parser" where the "start after" value is the wildcard expression: *, FL and the "continues until" value is end of line:
Also, it can be done with a expression match email parser. A bit more complex but also possible. The regular expression is: FL\s*(?'postal_code'\d*-\d*)
It is also possible with a script-based email parser. This is the most complex way:
[syntax=csharp]
using EmailAndParser.ScriptingInterface;
using System.Collections.Specialized;
using System.Net.Mail;
public class MyScriptBasedEmailParser : ScriptBasedParser
{
public override NameValueCollection ParseEmail(MailMessage msg)
{
// This will be the fields that this script-based email parser will return
NameValueCollection returned_fields = new NameValueCollection();
// the email body is
string email_body = msg.Body;
// Get the position of "FL" in the email body
int position = email_body.IndexOf("FL");
string s;
if (position > 0)
s = email_body.Substring(position+2);
else
s = ""; // FL not found
returned_fields.Add("postal_code", s);
return (returned_fields);
}
}
[/syntax]
Thxs
Using , FL and the "continues until" works I had that figured out after I saw the , wich is thesame on all that I get
Last one is the where it says MIAMI
Spent two hours and can not get that
Using , FL and the "continues until" works I had that figured out after I saw the , wich is thesame on all that I get
Last one is the where it says MIAMI
Spent two hours and can not get that
For the city you need to use a "expression match" email parser. Set it to capture a regular expression from the text only version of the email body. Then fill "city" in the field name and enter this regular expression:
(?'city'.*), FL
That should work fine. If you have any other questions feel free to post again.
(?'city'.*), FL
That should work fine. If you have any other questions feel free to post again.
It says this
No coincidences have been found for the field Address 2 .
No coincidences have been found for the field Address 2 .
Note that the field name must be 'city'.
I cut and pasted it (?'city'.*), FL
Still nothing
Still nothing
Check if your configuration is the same as mine:
If it still does not work please send me your configuration file (Preferences->Backup and restore settings->Backup) You can change your email souce settings first for privacy.
If it still does not work please send me your configuration file (Preferences->Backup and restore settings->Backup) You can change your email souce settings first for privacy.
Here it is
I hope you can make it work
THXS Steve
I hope you can make it work
THXS Steve
Attachments
(67.9KiB)Downloaded 688 times
Hi Steve,
That file seems to be corrupted. Please, send me it by email (to support@automatedemailparser.com) or post it here again
That file seems to be corrupted. Please, send me it by email (to support@automatedemailparser.com) or post it here again
- All times are UTC -
