Need regexp filter help

Need regexp filter help

Post by Rik slav » Sun, 06 Nov 1994 05:38:51



I want to create a regular expression filter which will filter out
all file names which end in:

   .d
   .o
   .mk
   .mkh
   ~

Can someone please show me how to create this filter?

Thanks.

 
 
 

Need regexp filter help

Post by Olivier AUBE » Tue, 08 Nov 1994 18:55:42


The regexp you want looks like

 /.+\.(d|o|mk|mkh)/

 .+ stands for any character, 1 or more times
 \. stands for the . itself, and not its special meaning
 (d|o|..) stands for d or o or ...

Hope this helps.

 +--------------------- Just another Perl Hacker... -------------------------+
 | Olivier AUBERT  Telecom Bretagne  BP 832  29285 BREST Cedex  --  FRANCE   |
 |               Phone: +33 98 00 16 03  ---  Fax: +33 98 45 51 33           |

 |   My <A HREF="http://nebuleuse.enst-bretagne.fr/~aubert/">hyperplan</A>   |
 +---------------------------------------------------------------------------+
--
 +---------------------------------------------------------------------------+
 | Olivier AUBERT  Telecom Bretagne  BP 832  29285 BREST Cedex  --  FRANCE   |
 |               Phone: +33 98 00 16 03  ---  Fax: +33 98 45 51 33           |

 |   My <A HREF="http://nebuleuse.enst-bretagne.fr/~aubert/">hyperplan</A>   |
 +---------------------------------------------------------------------------+

 
 
 

1. regexp help needed

Hi All

I have a very very big trace file where all strings that begins from 10
spaces and minimum 3 UppCase Letters  must be deleted, eg:
          RETURN_FAILURE               0                5
          RETURN_FAILURE               0                2
          COP_WLD                              1                21

awk'/$0 != "[:space:]{10}[A-Z]{3}*"/' file -doesn't work
        $0 !~ /"[:space:]{10}[A-Z]{3}*"/     doesn't work
        $0!~ /\"          \"[A-Z]{3}/               doesn't work     also

Could You help please?

2. Unicode and wide char on Solaris >= 2.5.1

3. Need help with regexp and sed...

4. Hackers/EVERYONE please READ THIS!!

5. need help with regexp

6. HELP! /dev/fd0h1440

7. perl - need help with a regexp

8. Linux Frequently Asked Questions with Answers (Part 4 of 6)

9. Filters, Filters, where are you Filters...

10. Help needed with DIALD filter rules, please!

11. shell wildcards to regexp convertor needed

12. Need help with lpr filters

13. Help needed: Ghostscript as /etc/printcap filter