Thread RegEx Schalter variabel (3 answers)
Opened by bianca at 2013-06-06 09:27

payx
 2013-06-06 09:56
#168016 #168016
User since
2006-05-04
564 Artikel
BenutzerIn

user image
Hallo Bianca,

so geht's:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
#!/usr/bin/perl
use strict;
use warnings;

my $beg = 'Test';
my $such = 'test';
my $gross_klein = 0;
my $modifier = (!$gross_klein ? 'i' : '');
if ($beg =~ m/(?$modifier)$such/) {print "ja\n"}


Referenz:

http://perldoc.perl.org/perlretut.html#Embedding-c...

HTH
Grüße
payx

View full thread RegEx Schalter variabel