Search the web
Sign In
New User? Sign Up
textpipe-discuss · TextPipe user discussion forum
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Extracting two lines together... ? Help! :)   Message List  
Reply | Forward Message #519 of 525 |
Re: Extracting two lines together... ? Help! :)

--- In textpipe-discuss@yahoogroups.com, "Seven" <sevenkitten@...> wrote:
>
> I have been working on some data extraction. I am using textpipe
> pro as well as Easy pattern helper.. I need to extract two lines
> that read like this
> Sales:
> $200.12 bil
> There is the line break in it and the numbers in red are the
> variable chars.
> I can get it to pull up using the Perl pattern
> (?:Sales:)
> (?:(?:[[:digit:]!"#$%&'()*+,\-./\\:;=?@\[\]\^_`{}~|]{1,7}?))(?:
> bil) ........ which is the same as this EasyPattern

Simple. Replace line break with whitespace after "Sales:"
First filter (replace):
-Search
(Sales:)(\r\n)
-Replace with
$1[ ]
Second filter (extract matching line, or just grep)
- Match pattern
Sales:

So first filter appends next line to "Sales:" line resulting in
Sales: $120.12 bil
Second filter extracts all lines with "Sales:" in it




Tue Jan 23, 2007 8:28 pm

d.rybas
Offline Offline
Send Email Send Email

Forward
Message #519 of 525 |
Expand Messages Author Sort by Date

I have been working on some data extraction. I am using textpipe pro as well as Easy pattern helper.. I need to extract two lines that read like this Sales: ...
Seven
sevenkitty_77
Offline Send Email
Jul 27, 2006
10:10 pm

... Simple. Replace line break with whitespace after "Sales:" First filter (replace): -Search (Sales:)(\r\n) -Replace with $1[ ] Second filter (extract...
d.rybas
Offline Send Email
Feb 7, 2007
9:15 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help