Extraction between lines

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

p1paul
Posts: 1
Joined: Sat Jan 19, 2008 7:32 am

Extraction between lines

Postby p1paul » Sat Jan 19, 2008 7:44 am

I'm new to this RegEx stuff so whilst I'm learning can someone assist with this I'll assume basic query...

I'm wanting to extract data between two lines, the data is as follows

CompanyInfo.aspx@key
Image Printers & Suppliers 41 Park Av , Knaresborough, HG5 9ES Tel: 01423 869533 Business type

I want to extract everything between 'CompanyInfo.aspx@key' and 'Business type' and create a new file with the extracted data in it...

Thanks

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Tue Feb 05, 2008 7:59 pm

Use a perl search/replace with the Extract option on.

Search for:
CompanyInfo.aspx@key(.*)Business type

Replace with
$1\r\n

Use the output filter to send the results to a new file
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 2 guests