You have one .+ that is not surrounded by <> If you only want what is between <> then you should surround it with <> $line =~ /\[GUARD\].+<(\d_)><(\d+)><(.+)><(.+)><(.+)>.+<(.+)>/; ----- Original Message ----- From: "Yacketta, Ronald" <[EMAIL PROTECTED]> To: "Beginners (E-mail)" <[EMAIL PROTECTED]> Sent: Friday, January 18, 2002 1:39 PM Subject: regex issues
> Folks, > > I have the following log line > > [GUARD] ux234<870><1764517><13.231.232.72><CK> IMP <imp> > > here is the regex I am attempting to use > # $1 $2 $3 $4 $5 > $6 > elsif ( $line =~ /\[GUARD\] (.+)<(\d+)><(\d+)><(.+)> (.+) <(.+)>/) > { > print "$line\n"; > print "$1 $2 $3 $4 $5 $6\n"; > $name = $1; > $name =~ s/\|/"\@"/g; > $wonid = $3; > $server = ""; > $cheat = $6 > } > and I get the following output. > ux234 870 1764517 13.231.232.72><CK IMP imp > > I am trying to capture the values between the <>'s as arguments, not sure > why > the output looks as it does. > > Ronald J. Yacketta > Principal Consultant > Ciber, INC > 345 Woodcliff Dr. > Fairport, NY 14450 > ----------------------------------------------------------------------- > The information transmitted is intended only for the person or entity to > which it is addressed and may contain confidential and/or privileged > material. > > Any review, retransmission, dissemination or other use of, or taking of > any action in reliance upon, this information by persons or entities other > than the intended recipient is prohibited. > > If you received this in error, please contact the sender and delete the > material from any computer. > -- > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]