in reply to Re: Regex for IOS messages
in thread Regex for IOS messages

The problem is that 'User...' is not on a line by itself, but is part of a larger record, all on one line. In that case, you don't want the beginning-of-line anchor ^. Just allow it to match anywhere on the line, i.e. let it float:
my ($user, $group, $connected, $type) = $VAR2 =~ /User \[(\w+)\] Group \[(\w+)\] (\w+), Session Type: +(\w+) +/;
If you would like to learn more about the regex features I am using in this exmaple, check out the tutorial perlrequick.

-Mark

Replies are listed 'Best First'.
Re: Re: Re: Regex for IOS messages
by Anonymous Monk on Apr 12, 2004 at 21:17 UTC
    Mark, thanks, that did the trick. You are my new best friend.