thanks it's solved

-----Mensaje original-----
De: Sparrow, Dave [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 17 de julio de 2003 15:38
Para: Ruben Montes; '[EMAIL PROTECTED]'
Asunto: RE: Pattern matching


How about this:

$_ = "<45>13: 16:18:46: %SYS-5-CONFIG_I";
print "$1\n" if /(%.*)$/;

or, if you're reading lots of lines like this from a file:

while(<>) {
  print "$1\n" if /(%.*)$/;
}

Cheers,
Dave


-----Original Message-----
From: Ruben Montes [mailto:[EMAIL PROTECTED]
Sent: 17 July 2003 10:21
To: '[EMAIL PROTECTED]'
Subject: Pattern matching


Hello,

I have this string: 

<45>13: 16:18:46: %SYS-5-CONFIG_I

and I only want to print all the characters behind %:

%SYS-5-CONFIG_I

How can I make this?

Regards
 

-- 
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]

Reply via email to