Hi

I am trying to regex a make output line (g++) and don't get it together.
What I want is:

All lines where the -c option does not occure, neither before nor after the -o 
option and then extract the portion after the -o option.

$regexApplication = '(?<![ \t]-c[ \t])-o[ 
\t]+((/?([\w\.]+/)*)?([\w]+(\.[\w]+)?))[ \t]+(?!.*[ \t]-c[ \t])';

$refStrAppl = \$1;

elsif( $inputLine =~ m/$regexApplication/ )
{
  push( @applications, $$refStrAppl );
}

How do I build a regex that checks for inexitstance of a certain pattern, in my 
case [ \t]-c[ \t] and existance of another pattern, my case -o[ 
\t]+((/?([\w\.]+/)*)?([\w]+(\.[\w]+)?))[ \t]+    ? (last q-mark is not regex) 

Or do I have to split it? I am close to do it that way. Not nice, but simpler.

Appreciate any help

Cheers

Roman
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to