in reply to Re: Re: complicated expression
in thread complicated expression

my $foo = "211.46.248.1 /the / directory / is / here/ l:user p:pass po +rt:21"; my @bar = $foo =~ /^(\d+\.\d+\.\d+\.\d+) +(.+)(?= l:) +l:(\S+) p:(\S+) + port:(\d+)/; print join ',', @bar; # prints 211.46.248.1,/the / directory / is / here/,user,pass,21

You may want to qr// the RegEx if you plan to use it inside of a loop while parsing your file.

--perlplexer

Replies are listed 'Best First'.
Re: Re: Re: Re: complicated expression
by Anonymous Monk on Apr 03, 2002 at 15:01 UTC
    Very Great! Many thanks to YOU and the other who were helping!
    Greets, Perldude