-----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 capturing the word (\w) character at the start.
You're capturing four variables, but you only show breaking down into three.
The . in your regexp represents any byte, not a literal period, for that you
need \.
[\w+|\d+] is confusing, since digits are included in \w, just use it.

Try:

($ref,$numt,$id,$ext) = ($PATH[7] =~ /(\w)-(\d{7})-(\d{2})\.(\w+)/);



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to