Thread String Bearbeiten - Wörter extrahieren (13 answers)
Opened by tophoven at 2007-10-06 14:27

harvey
 2007-10-06 16:05
#100395 #100395
User since
2007-10-06
16 Artikel
BenutzerIn
[default_avatar]
So geht's:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /usr/bin/perl
my $rw = open(FILE,"localconf.php");
if(not defined($rw)) {
         die "Fehler beim ¨Offnen der Datei: $!\n";
 }
while(defined(my $zeile = <FILE>)) {
        # $zeile = qq~$TYPO3_CONF_VARS['EXT']['extList'] = 'css_styled_content,tsconfig_help,context_help'; //~;
         if( $zeile =~ /\$TYPO3_CONF_VARS\['EXT'\]\['extList'\]/ ) {
                 print "Wörter, noch nicht separiert: $zeile\n";
          my @array = split(/'/, $zeile);
          my @brray = split(/,/, $array[5]);
        foreach $chunk (@brray) {
                        print("-$chunk\n");
                }
  }else{
         print "kein match\n";
  }

}

close(FILE);

View full thread String Bearbeiten - Wörter extrahieren