rex question

Post Reply
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

rex question

Post by sourceuno »

How can I use rex to retrieve any characters between these 2 strings, "delimeter" and "http://www.somesite.com"? Do I need to replace the '.' literals in the second string with '/.'?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

rex question

Post by mark »

It's not clear what you're really trying to do, but this might do what you asked:

>>delimiter\P=!http://www\.somesite\.com+\Fhttp://www\.somesite\.com
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

rex question

Post by sourceuno »

Thanks, that almost did the job. Rex is now returning a string that includes "delimeter". How can I return anything between the last "delimeter" and "http://www.somesite.com"?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

rex question

Post by mark »

search in the other direction:
delimiter\P=!delimiter+>>\Fhttp://www\.somesite\.com

I don't know what your big picture is, but if you're extracting data from a delimited "record" you might want to look at <split> or <timport>.
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

rex question

Post by sourceuno »

What I'm actually trying to do is retrieve the column names from an html table which are in the first row of the table. Can this be done using timport?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

rex question

Post by mark »

Probably. You would probably use "recexpr" and supply a single rex expression to match the entire "row". Then you can pickout the data from the various columns. See the timport manual for how to use recexpr.
Post Reply