Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: regex question

by rchiav (Deacon)
on Nov 16, 2001 at 20:09 UTC ( #125841=note: print w/replies, xml ) Need Help??


in reply to regex question

There's a couple ways you could do it. Here's one, but there can't be a '.' or a '|' in the file name.
$string=~ /\s*([^.|]+)\.mp3/; print "$1\n";
Hope this helps,
Rich

update
Use:

$string=~/\s*([^|]+)\.mp3/;
The period wasn't needed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://125841]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2021-09-17 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?