Extract A Certain Part of Text (Partial)

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Extract A Certain Part of Text (Partial)

by Reaper on Tue Jul 12, 2016 11:53 pm

iMacros for Firefox 8.9.7 (Firefox 47) , Win 7 x64
Extraction Dialog is created by Imacros 10 IE

The Actual Text is
Code: Select all
Dear xxxxxxx
Please log in using your login code below:
qpy6HW

This email was sent because someone tried to log in from a new browser or location with your correct email address and password.
If it wasn't you trying to log in, please change your password immediately. Please also consider changing your password on all services you are using this password for.


I want to extract the
Code: Select all
qpy6HW


This Code always changes but the location of the code is always the same

i am trying to store this Code Portion in !VAR
and later use it

in my example the code is
Code: Select all
qpy6HW

and i want to store this in !VAR

Is it Possible ?

I can Extract the entire Text
Its from an Email

I can help you get an idea if you need a live example . just tell me i will arrange something .
Reaper
 
Posts: 15
Joined: Fri Jun 03, 2016 3:26 am

Re: Extract A Certain Part of Text (Partial)

by chivracq on Wed Jul 13, 2016 2:22 am

Reaper wrote:
Code: Select all
iMacros for Firefox 8.9.7 (Firefox 47)  , Win 7 x64

Extraction Dialog is created by Imacros 10 IE

The Actual Text is
Code: Select all
Dear xxxxxxx
Please log in using your login code below:
qpy6HW

This email was sent because someone tried to log in from a new browser or location with your correct email address and password.
If it wasn't you trying to log in, please change your password immediately. Please also consider changing your password on all services you are using this password for.


I want to extract the
Code: Select all
qpy6HW


This Code always changes but the location of the code is always the same

i am trying to store this Code Portion in !VAR
and later use it

in my example the code is
Code: Select all
qpy6HW

and i want to store this in !VAR

Is it Possible ?

I can Extract the entire Text
Its from an Email

I can help you get an idea if you need a live example . just tell me i will arrange something .

Yep, easily achievable with 'EVAL()' and 'split()' (x2), search my Posts, I've already produced several Examples...

(It can be done with 'replace()' as well instead of 'split()', though less reliable and a bit more cumbersome, or with 'indexOf()' + subStr()'/'subString()' (several Examples on the Forum as well), but 'split()' is the best way imho...)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

-->