in reply to Re: Regexp parses only first line correctly
in thread Regexp parses only first line correctly

I had that initial suggestion as well, but withdrew that recommendation because it will fail if the line contains a path with more than one slash, such as :
hostname: /dir3/dir4 level=incr, 1449 MB 00:56:31 46 + files
Keeping the character class, but correcting repetition will work in this case as well.

     Have you been high today? I see the nuns are gay! My brother yelled to me...I love you inside Ed - Benny Lava, by Buffalax

Replies are listed 'Best First'.
Re^3: Regexp parses only first line correctly
by broomduster (Priest) on Aug 16, 2008 at 19:38 UTC
    Yes, I see that you (almost completely) changed your original reply, but with no indication of the changes.

    Even better might be

    \s+ \w+: \s /\w*(?:/\w+)* \s+ # host, partition
    Update: Getting a regex in there that matches all possible (legal) path specifications is more complicated than what I have here. Usual advisories about "know your data" apply.