email parsing automation

Email Parser

Extract data from emails and automate your workflow

The forum is now read only. Please, go to the the main Email Parser website if you need help.
Need help configuring the program? Have any questions regarding its use?
I want to capture data from three fields in the email body as follows:

For the field "Area" limit the captured data to only the first 50 characters
For the field "Details" limit the captured data to only the first 200 characters
For the field "Cause" limit the captured data to only the first 200 characters

If the number of characters in the submitted text is less than the specified 50 or 200 the sparser should capture whaterver is submitted.

So if the input is :->
Area: harare london new york beijing
manchester madrid paris hong kong
singapore monaco pretoria cairo lagos lusaka

Details: Behind the curtain there is a world of calm,behind that thick green is sanctuary, profound hush.
An unsullied realm, its silence. From that flowing vision of another world,
from that other reality's diaspora of sounds; from that other time, enmeshed, they are calling me.

Cause: From the thick darkness of the middle ages man's
struggling spirit emerged as in new birth; breaking out of
the iron control of that period;
I want the output to be:->
Area: harare london new york beijing
manchester madrid p

Details: Behind the curtain there is a world of calm,behind that thick green is sanctuary, profound hush.
An unsullied realm, its silence. From that flowing vision of another world,
from that other reality's d

Cause: From the thick darkness of the middle ages man's
struggling spirit emerged as in new birth; breaking out of the iron control of that period;
I have problems when the input data comes in multiple lines as shown above. Because the number of lines is unpredictable I cannot implement " ... until end of line". I tried using regex but was not successful.

Regards
Shepherd
Hello Sheperd,

Try these regular expressions:

Area:(.|\r|\n){1,50}
Details:(.|\r|\n){1,200}
Cause:(.|\r|\n){1,200}

They were a bit tricky to write because using character number limit is not very common. I highly recomment an external tool to write complex regular expressions, they show all the available options you can add to your regular expression. My preferred one is Expresso:

http://www.ultrapico.com/expresso.htm