[plug] Re: grep and regular expressions...

David Buddrige buddrige at wasp.net.au
Fri May 16 11:41:59 WST 2003


Further to my last email, the following perl script also fails to find
the line concerned: 

#!/usr/bin/perl 

my $line_num=0;
while(<>)
{
   $line_num++;
   my $temp_val = $_;
   if ( $temp_val =~ m[\\f$] )
   {
       print "$line_num: $temp_val";
   }
} 

Any suggestions as to why this might be failing to find the line concerned 
greatly appreciated. 

thanks in advance. 

David. 8-) 

David Buddrige writes: 

> Hi all,  
> 
> I have a series of html text files that have the characters \f at the end 
> of some of the lines.  
> 
> I am wanting to run a grep command that will pick up any line in the file 
> that ends with the literal characters " \f"  (that is to say space, slash 
> f)  
> 
> I have tried the following grep commands to pull out these lines:  
> 
> 
> grep "\\f$" *.htm  
> 
> and  
> 
> grep "\ \\f$" *.htm  
> 
> and  
> 
> grep " \f$" *.htm  
> 
> grep "f$" *.htm  
> 
> however none of these match the lines I am after.  Can anyone see what's 
> wrong with my regular expressions?  
> 
> thanks  
> 
> David Buddrige.  
> 
>  
> 
> the expected start and end times of the plan can be modified<a 
> name="IX_165"></a> \f  
> 
 



More information about the plug mailing list