jackassplus wrote:
>>> $data =~ s{ (?<! \n ) \n (?! \n ) }{}gmsx;
> 
> I have no Idea what that is supposed to do.

It removes all singly occurring newlines.

This is a negative, zero-width, look-behind assertion (?<! \n )  It
means that the variable does not match what it contains, in this case a
newline, before the match but do not include what it matches in the match.

This is a negative, zero-width, look-ahead assertion (?! \n )  It means
that the variable does not match what it contains after the match but do
not include what it matches in the match.

See `perldoc perlre` and search for /Extended Patterns/
or http://perldoc.perl.org/perlre.html#Extended-Patterns


-- 
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to