Menu

condition in pattern

Help
2002-08-27
2002-09-03
  • Nobody/Anonymous

    Hi

    the buffer that I am working on:

    Filesystem            kbytes    used   avail capacity  Mounted on
    /proc                      0       0       0     0%    /proc
    /dev/dsk/c0t0d0s0     962134  803782  100624    89%    /
    /dev/dsk/c0t0d0s6    4030518 1340030 2650183    34%    /usr
    fd                         0       0       0     0%    /dev/fd
    /dev/dsk/c0t0d0s3    4030518  826753 3163460    21%    /var
    /dev/dsk/c0t0d0s7    5498622 5413039   30597   100%    /home
    /dev/dsk/c0t0d0s5    3007086  936744 2010201    32%    /opt
    swap                 2313128    1216 2311912     1%    /tmp
    /vol/dev/dsk/c0t2d0/volume_name
                          636528  636528       0   100%    /cdrom/volume_name

    and I declearde pattern :

    \s+(\d+)\s+(\d+)\s+\d+\s+(\d+)\%\s+(.*)

    the question is:
    How can I declered pattern that will get alllines except the line that I have the text "cdrom"?

    thanks

     
    • Sergey A. Samokhodkin

      Hi!

      Try
      \s+(\d+)\s+(\d+)\s+\d+\s+(\d+)\%\s+(?!.*cdrom)(.*)

      Regards

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.