REGEX difference between Firefox and IE

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
jimbobarto
Posts: 6
Joined: Fri Jan 21, 2011 10:20 am

REGEX difference between Firefox and IE

Post by jimbobarto » Fri Jan 21, 2011 5:10 pm

Got the following SEARCH command that works fine in Firefox but not in IE:

SEARCH SOURCE=REGEXP:"id\=\"(\S+navigation_NavNewBusinessButton)\"" EXTRACT=$1

In IE I get the following error message:

Error -1200: parsing "id\=\"(\S+navigation_NavNewBusinessButton)\"" - Unrecognized escape sequence \S.

Is there an IE synonym for a non-whitespace pattern match? Or is the problem something else? The name of this link changes slightly across several pages, hence the regex.
Tom, Tech Support
Posts: 3498
Joined: Mon May 31, 2010 4:59 pm

Re: REGEX difference between Firefox and IE

Post by Tom, Tech Support » Wed Jan 26, 2011 5:17 pm

Hi Jim,

This is a good question, let me see if I can some more information from one of the developers about this.
Regards,

Tom, iMacros Support
jimbobarto
Posts: 6
Joined: Fri Jan 21, 2011 10:20 am

Re: REGEX difference between Firefox and IE

Post by jimbobarto » Tue Feb 08, 2011 9:23 am

Any news on this?
Tom, Tech Support
Posts: 3498
Joined: Mon May 31, 2010 4:59 pm

Re: REGEX difference between Firefox and IE

Post by Tom, Tech Support » Tue Feb 08, 2011 4:22 pm

Hi Jim,

I have to apologize, I forgot about this one. I just referred this thread to one of our developers to try and get some clarity on the issue.
Regards,

Tom, iMacros Support
Tom, Tech Support
Posts: 3498
Joined: Mon May 31, 2010 4:59 pm

Re: REGEX difference between Firefox and IE

Post by Tom, Tech Support » Wed Feb 09, 2011 11:29 am

Hi Jim,

Here's your answer:
iMacros Browser and iMacros for IE use the .NET regexp engine and since the backslash is an escape sequence by itself, its occurrence has to be escaped as well. For example: to specify \S in your regular expression, you should use \\S.
I have updated our Wiki documentation to reflect this information.
Regards,

Tom, iMacros Support
Post Reply