Extract text between tags

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
Posts: 9
Joined: Fri Jan 18, 2008 5:45 pm

Extract text between tags

Post by canis »

I have a lot of html files with similar structure:
<td align=right>numbers</td>

How to extract everything between tags to different files?
At this moment I know how to extract numbers between first pair of tags:

Extract lines matching [<td>47:28]
Remove HTML and XML
Remove blanks from Start of Line
Remove blanks from End of Line

I can't guess how to extract text between other pairs. Can anybody help?
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Re: Extract text between tags

Post by DataMystic Support »

Use perl pattern search/replace, find

Code: Select all

Action: Send var 1 to subfilter.

As a subfilter, add a Special\Secondary Output filter - directing output to the file you need.

Repeat these two steps for each section you need.
Post Reply