Re: Need help please

intertwingled <intertwingled-r9/[email protected]>
Newsgroups gmane.editors.nedit.user
Message-ID <[email protected]>
Better to do it in Perl!

Michael Smith wrote:
> On Wed, 29 Jul 2009 05:03:50 -0700 (PDT)
> marvin carandang <marvin_ee2006-/[email protected]> wrote:
> 
>> Hello Nedit Experts,
>>
>> I have a long list of digital pattern and would like to delete certain groups of texts in between. I attached a snap-shot below. ( I just changed the content due to confidentiality reasons):
>>
>> ------------------------------------------------------------------
>> Page 1 abcdefassdsd,msdskdskskds
>> njsdsdjskd 
>> ...
>> ...
>> ..
>> ....
>> .....
>>                                                                                                                                  Example
>>       < Digital Data>
>>
>> Page 2 abcdefassdsd,msdskdskskds
>> njsdsdjskd 
>> ...
>> ...
>> ..
>> ....
>> .....
>>                                                                                                                                  Example      
>>     <Digital Data>
>>
>> ...and so on....
>> -------------------------------------------------------
>>
>>
>> I want to delete all characters starting from the "space" after the page number until the word "Example". I short, I need the resulting data to be like this:
>> ------------------------------------
>> Page 1
>>
>>         < Digital Data>
>>
>> Page 2
>>
>>        < Digital Data>
>>
>> Page 3
>>
>> ... and so on
>> --------------------------------------
>> This is thousands of pages long but the pattern is just the same. How do I do that? Thanks for the help!!!
>>
>> //electron
>>
>>
>>       
> 
> Better to write an awk program. 
> 
> /^Page.*$/ {
>     skip=1
> }
> 
> /^.*Example.*$/ {
>     skip=0
> }
> 
> {
>     if(skip != 0)
>     {
>         print
>     }
> }
> 
> 
> This is just an indication of what you can do. It won't work properly up front. If you can send me some actual data I might be able to do a better job with 10 minutes of hacking or so.
> 

-- 
I always have coffee when I watch radar!
-- 
NEdit Discuss mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.