Imacros return error on valid regular expression?

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Posts: 6
Joined: Fri Nov 25, 2011 1:15 pm

Imacros return error on valid regular expression?

Post by kjemmo » Fri Nov 25, 2011 1:29 pm


I am trying to match any URL that contains one or more specific words.

Here my code:

Code: Select all

SEARCH SOURCE=REGEXP:"\b(https?)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*(myword|mysecondword|mythirdword)[-A-Za-z0-9+&@#/%?=~_|!:,.;]*"
The regex works fine when I test it with: and will match any URL containing the words myword, mysecondword, mythirdword.

But Imacros return the error: RuntimeError: Source does not match to REGEXP

What am I during wrong?

Marcia, Tech Support

Re: Imacros return error on valid regular expression?

Post by Marcia, Tech Support » Tue Nov 29, 2011 9:16 am


The text searched with the command SEARCH has to be in the html document. Just as if you used the "View the page source" in your browser and searched for that text using a simple editor.
Tom, Tech Support
Posts: 3645
Joined: Mon May 31, 2010 4:59 pm

Re: Imacros return error on valid regular expression?

Post by Tom, Tech Support » Wed Nov 30, 2011 11:03 am

Hello kjemmo,

What version of iMacros are you using? If you are using the iMacros Browser or iMacros for IE, please be aware that you need to escape backslash characters with another backslash. So \b would become \\b in your case.

Tom, iMacros Support
Post Reply