Since I am not familiar with your data I will assume that it occurs anywhere is $line you want to still match. m/\s*ORA-(\d+)\s+/
Any spaces characters followed by ORA- followed by any digits 0-9 followed by any space characters. Using the () you have placed that portion of the match into variable $1. Let me know if I am misunderstanding what you are trying for. > -----Original Message----- > From: Steve Main [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 06, 2002 1:37 PM > To: Help on PERL > Subject: Regex > > > > Hello list, > > I am trying to code a regex to pull out the number part of > "ORA-600" or 600. > > I have started with "if ($line =~ m/^(ORA-)(\-[0-9]*)$/) {" but this > is obviously wrong. > > Anyone out there willing to get me on the right track? > > thanks > > Steve > > -- > 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]