Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: regular expression

by McDarren (Abbot)
on Feb 28, 2010 at 05:51 UTC ( #825734=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $string = '~/tmp/hfj/abc/bhd/5009.xmlreal.xml';
    $string =~ s/^.*\/\d+//;
    print "$string\n";
    
  2. or download this
    use File::Basename;
    $string = '~/tmp/hfj/abc/bhd/5009.xmlreal.xml';
    my ($filename, $directories, $suffix) = fileparse($string);
    $filename =~ s/^\d+//;
    print "$filename\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://825734]
help
Chatterbox?
[Discipulus]: ah marto are thou escaping Corion's visit? ;=)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2017-11-24 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (346 votes). Check out past polls.

    Notices?