John Doe wrote:
[EMAIL PROTECTED] am Freitag, 13. Januar 2006 18.28:
[...]

i`ve written a script whose purpose is to put files in different
directories by its first later, the problem is that every file begins
with different chars for example "01 - Eminem Encore.mp3"
my question is how can i get to the first latter in the name (in this
case it was E), i need just the expression that does it.

/([a-zA-Z])/;


I think your version does the same as mine,
/^[^a-zA-Z]*([a-zA-Z])/
which looks somehow brain dead...

/([[:alpha:]])/;
my $first_letter = $1;

See `perldoc perlre` and search for 'alpha'. Sorry does not work with UNICODE characters, just the lower 256.


--

Just my 0.00000002 million dollars worth,
   --- Shawn

"Probability is now one. Any problems that are left are your own."
   SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is available at http://perldoc.perl.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to