Thread Pattern Matching: Probleme Muster zu erstellen (20 answers)
Opened by peggy at 2004-08-03 16:11

renee
 2004-08-04 12:52
#85284 #85284
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
mit substr:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /usr/bin/perl

use strict;
use warnings;

my $string = 'Object_Plant :Color Position;Object';

my $pos_dp = index($string,':');
my $pos_sk = index($string,';');
my $part_one = substr($string,0,$pos_dp);
my $part_two = substr($string,($pos_dp + 1),($pos_sk - $pos_dp - 1));
my $part_three = substr($string,($pos_sk + 1));
print $part_one," -> ",$part_two," -> ",$part_three,"\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 Pattern Matching: Probleme Muster zu erstellen