O
Oliver Meister
Hello all
I might ask a quite trivial question but I don't get any further -
please excuse.
The following content is held in a string "$SingleMessage".
---------------------------------------------
1035 Zxxxxxxx
2317 XXXXXXXXXXXXXXXXXXXX
940 02
:20:XXXXXX202
:25:XXX25XXXXXXXXXXXX
:28:XXXXXXXXXXXXXXXXXXXX1
X XXXXXXXXXX XX XXXXXX X XXXXXXXXXX XX XXXXXX
X XXXXXXXXXX XX XXXXXX
:60F:XXXXXXXXXXXXXXXXXXXX1
:62F:XXXX222XXXXXXXXXXX
XXXX222XXXXXXXXXXX XXXXXXXXXX XX XXXXXX
:64:XXXXXXXXXXXXXXXXXXXX
---------------------------------------------
I'd like to receive the value, where ":<nn>:" is the field seperator
and "xxxx" the value, until the next field.
In other words: I'd like to return the values in between two
seperators, selected by a seperator.
I was trying with $fld_28 =~ s/28(.*?)/$1/ ; print $1;
This prints ":28:" only ...
I guess, that the s/ option isn't suitable (?).
May somebody lend me a helping hand?
Regards,
Oliver
I might ask a quite trivial question but I don't get any further -
please excuse.
The following content is held in a string "$SingleMessage".
---------------------------------------------
1035 Zxxxxxxx
2317 XXXXXXXXXXXXXXXXXXXX
940 02
:20:XXXXXX202
:25:XXX25XXXXXXXXXXXX
:28:XXXXXXXXXXXXXXXXXXXX1
X XXXXXXXXXX XX XXXXXX X XXXXXXXXXX XX XXXXXX
X XXXXXXXXXX XX XXXXXX
:60F:XXXXXXXXXXXXXXXXXXXX1
:62F:XXXX222XXXXXXXXXXX
XXXX222XXXXXXXXXXX XXXXXXXXXX XX XXXXXX
:64:XXXXXXXXXXXXXXXXXXXX
---------------------------------------------
I'd like to receive the value, where ":<nn>:" is the field seperator
and "xxxx" the value, until the next field.
In other words: I'd like to return the values in between two
seperators, selected by a seperator.
I was trying with $fld_28 =~ s/28(.*?)/$1/ ; print $1;
This prints ":28:" only ...
I guess, that the s/ option isn't suitable (?).
May somebody lend me a helping hand?
Regards,
Oliver