extract certain word in paragraph

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:


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 certain word in paragraph

by matt121400 on Thu Dec 18, 2008 8:20 pm

ok the sentence is in 1 body and i need to extract 1 specific word that is different every time but its always preceded and followed by the same thing

this is what it looks like
Logging in... OK sending...text='welcome'

my question is how do i extract just the word that comes in the quotation things , in this example i would like to extract the word welcome
Posts: 6
Joined: Thu Dec 18, 2008 8:16 pm

Re: extract certain word in paragraph

by Tech Support on Mon Dec 22, 2008 8:09 am

We recommend the following:

1. Extract the complete sentence. iMacros works on the HTML element level. It always extracts the information of one web page element at a time, e. g. the text between the <a>hello, my name is "Mike"</a>)

2. Return text to a script with iimGetLastExtract

3. Use some string functions of your favorite scripting language (VBS, Perl, C#,...) to process the string and extract the part you really need. In VB script these would be the instr or split functions. Example: http://wiki.imacros.net/Get-Exchange-Rate.vbs
User avatar
Tech Support
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

Re: extract certain word in paragraph

by additional001 on Tue Jan 06, 2009 3:26 pm

In JavaScript this would prob be done with a combination of the String & RegExp Objects
Posts: 175
Joined: Sat Jul 05, 2008 8:24 pm

Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: No registered users and 2 guests