Thread Frage zum substitutionsoperator!
(1 answers)
Opened by obilan at 2007-08-17 14:53
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #!/usr/bin/perl use strict; use warnings; my @cases = ( '2+(', '2(', '2+3', ); for my $case ( @cases ){ $case =~ s~\+(?!\()~ +~g; $case =~ s~(?<!\+)\(~ (~g; print $case,"\n"; } OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/) -- Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html Perl-Entwicklung: http://perl-services.de/ View full thread Frage zum substitutionsoperator! |