Pages: 1
RSS
Extracting data from inbox
 
I am wondering if there is a way to extract data from inbox?
For example, I have 100 emails that contains 'phone numbers' in them,
is there a macro/script that extract those data from each mail and put them into .txt file?

Please advise. Thanks
 
If those messages have got the same format, you could create a template that extracts the phone number and with that template linked to a (manual) filter you extract whatever info you want.
However if they don't have a format in common then you're out of luck.
__________________________________
I'm just a user of The Bat! I don't work for Ritlabs.
 
Can you please expand a little further on this?
Same format in terms of 'xxx-xxx-xxx'(numbers) or in terms of 'same placement' in every mail?
and how do I create a template?

Thanks again
 
Same placement or same keyword in front of the phone number.
But you'll need some regular expressions to extract the phone number, I don't know whether that's an option for you....

How to create templates? In this case trhat would be to create a filter with an export action and there yopu'll find a template button.
__________________________________
I'm just a user of The Bat! I don't work for Ritlabs.
 
Thanks for the prompt response once again.
Well, i know all my phone numbers are in 'xxx-xxx-xxxx' format, but they arent exactly in the same placement within the message, nor have the same keyword in front of them.

Any chance I can still get this going? Let me know. Thanks
 
I wouldn't try it, too little chance that it's going to work
__________________________________
I'm just a user of The Bat! I don't work for Ritlabs.
 
Quote
hare hare wrote:
Well, i know all my phone numbers are in 'xxx-xxx-xxxx' format, but they arent exactly in the same placement within the message, nor have the same keyword in front of them.

I've created small quick template, try to test it:
Code
%IF:"%_telFirsttime"="":"%-
%_telFirsttime(NIE)%-
%_text='%Text'%-
"%-
%SETPATTREGEXP="(?s)(\d{3}\-\d{3}\-\d{4})([^\d].*)"%-
%REGEXPBLINDMATCH(%_text)%-
%SUBPATT(1)
%_text="%SUBPATT(2)"%-
%IF:"%_text"<>"":"%QINCLUDE(tels)"%-


Important - name (handle) of this template is 'tels' (if You want to change it remember about changing %QINCLUDE parameter).

Test this in some messages with telephone numbers (reply, type 'tels' and hit ctrl+space).

To use this template in filter create a filter (in read messages), with condition 'any message', action: export the message (choose a file path and name, will be created) with export format plain text and template
Code
%QINCLUDE(tels)%-

Mark option "Append to the existing file".

In tab "Options" of this filter mark options "...active" "...for manual refiltering", add hotkey (for example ctrl+shift+1). Mark some messages, press hotkey and...
Pages: 1