Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How can I combine these two regular expressions?

by Fletch (Bishop)
on Mar 05, 2021 at 14:59 UTC ( [id://11129162]=note: print w/replies, xml ) Need Help??


in reply to How can I combine these two regular expressions?

If you need the filename separately considering the domain you might use Path::Tiny (or File::Basename) to split things up before you then apply your regex. It's semantically clearer what you're trying to do as well as isolating you from platform differences in directory separators.

my $filename = path( $path )->basename; my( $date, $time ) = $filename =~ m{## as others have shown}x;

The cake is a lie.
The cake is a lie.
The cake is a lie.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-26 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found