From: "francisrammeloo@..." Date: 2005-07-28T21:16:01+09:00 Subject: Newbie: unexpected result with string.split( regexpr ) Hi all, My goal is to obtain the filename out of a full pathname. This is the code: fullname = "./Dir/file.txt" array = fullname.split( /.*\// ) # Searches greedyly until the last slash The results are: puts array.length ==> 2 puts array[0] ==> (newline symbol or something??) puts array[1] ==> file.txt My questions are: Why has the array a length of 2? What is in array[0]? Best regards, Francis