Ummm no your are correct. I assumed it was imbedded in other text so do
this instead.
m/\bORA-(\d+)\b/

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 06, 2002 2:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Regex
> 
> 
> > m/\s*ORA-(\d+)\s+/
> 
> Correct me if I'm wrong, but wont this match fail if there are no 
> spaces after
> ORA-600
> 
> I would think this is better
> if ($line =~ m/ORA-(\d+)/){$number = $1;}
> 
> > > 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]
> > 
> > 
> 
> 
> -- 
> 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