"John W. Krahn" wrote:
>
> my ( $ref, $numt, $id, $ext ) = $PATH[ 7 ] =~ /(\w)-(\d{7})-(\d{2}).(\w+)/;
Sorry, that should be:
my ( $ref, $numt, $id, $ext ) = $PATH[ 7 ] =~ /(\w)-(\d{7})-(\d{2})\.(\w+)/;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Fo
Jerry Preston wrote:
>
> Hi!
Hello,
> I am getting no where on this and it is not that hard.
> I am trying to break down the following:
>
> D-2165033-10.TKB61a
>
> into
>
> D 2165033 10
>
> and
>
> 4-2175587-08.TKB63a
>
> into
> 4 2175587 08
>
> using
>
> (( $ref, $numt, $id, $ex
Nkuipers wrote at Mon, 30 Sep 2002 19:24:18 +0200:
> This idea is even simpler though not purely regex:
>
> $yourstring =~ s/\..*//;
> @result = split /-/, $yourstring;
Or still simpler:
my ( $ref, $numt, $id, $ext ) = split /\W/, $string, 3;
Greetings,
Janek
--
To unsubscribe, e-mail: [EM
This idea is even simpler though not purely regex:
$yourstring =~ s/\..*//;
@result = split /-/, $yourstring;
>= Original Message From "Mark Anderson" <[EMAIL PROTECTED]> =
>-Original Question-
>
>D-2165033-10.TKB61a => D 2165033 10
>
>and
>
>4-2175587-08.TKB63a => 4 21755
-Original Question-
D-2165033-10.TKB61a => D 2165033 10
and
4-2175587-08.TKB63a => 4 2175587 08
using
(( $ref, $numt, $id, $ext ) = $PATH[ 7 ] ) =~
/\w-(\d{7})-(\d{2}).[\w+|\d+]/;
What am I doing wring?
-My Response-
Your parens are in the wrong place.
You aren't capt
Hi!
I am getting no where on this and it is not that hard.
I am trying to break down the following:
D-2165033-10.TKB61a
into
D 2165033 10
and
4-2175587-08.TKB63a
into
4 2175587 08
using
(( $ref, $numt, $id, $ext ) = $PATH[ 7 ] ) =~
/\w-(\d{7})-(\d{2}).[\w+|\d+]/;
What am I doing