Thread Regex hängt sich auf? (6 answers)
Opened by bob.george at 2014-11-07 12:47

GwenDragon
 2014-11-07 12:55
#178180 #178180
User since
2005-01-17
14761 Artikel
Admin1
[Homepage]
user image
Wie machst du das? Was heißt beim Debug?

Da hängt sich nix auf:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
use strict; 
use warnings;

my $input_temp = <<TXT;
MIG 1 2 99 888 DOC /
TXT

if ($input_temp =~ /^.*((MIG|ERR|DOC)+.*)$/i) {
    print 
        '$1: ', $1, "\n", 
        '$2: ', $2, "\n";
}


PERL-5.14 T:\>perl -d "Perl Programm (neu).pl"

Loading DB routines from perl5db.pl version 1.33
Editor support available.

Enter h or `h h' for help, or `perldoc perldebug' for more help.

main::(T:\Perl Programm (neu).pl:6):
6: my $input_temp = <<TXT;
7: MIG 1 2 99 888 DOC /
8: TXT
DB<1> s
main::(T:\Perl Programm (neu).pl:10):
10: if ($input_temp =~ /^.*((MIG|ERR|DOC)+.*)$/i) {
DB<1> s
main::(T:\Perl Programm (neu).pl:11):
11: print
12: '$1: ', $1, "\n",
13: '$2: ', $2, "\n";
DB<1> s
$1: DOC /
$2: DOC
Debugged program terminated. Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.
DB<1> q

View full thread Regex hängt sich auf?