Data From Field / REX Search

Post Reply
rjhertzberg
Posts: 23
Joined: Wed Sep 10, 2008 10:38 am

Data From Field / REX Search

Post by rjhertzberg »

All -

Can someone please point me in the right direction...

I am attempting to pull out the contents of an HTML tag that exists on some of the web pages we are walking, and place it into an additional field we set up in our appliance. The HTML tag has a specific ID, and it looks like this:

<h3 id="profile-job-title">INSERT TITLE HERE</h3>

Can anyone provide me with some assistance in what I should put in the REX Search under the Data From Field in the "All Walk Settings" area so that I can just pull out the "INSERT TITLE HERE" piece.

Admittedly, I'm not a Regular Expressions expert, but I can't seem to get anything to work in there - even a simple REX. This seems like a very useful and powerful tool on the appliance and I'd really like to make use of it - but I'm obviously not doing something correct!!

Any help would be greatly appreciated!!!

Thank You,
Russell
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Data From Field / REX Search

Post by John »

The following should work, using just the id, not caring about the actual tag:

>>id\=\x22profile-job-title\x22=[^>]*>\P=[^<]+

which looks for id="profile-job-title", eats anything before the >, then matches the > as a prefix. The result will be everything up the following <
John Turnbull
Thunderstone Software
rjhertzberg
Posts: 23
Joined: Wed Sep 10, 2008 10:38 am

Data From Field / REX Search

Post by rjhertzberg »

Awesome! Works like a charm - thank you so much for your quick response - this has saved me a lot of time (and headache!!).

Thanks,
Russell
Post Reply