Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Parse string and extract word after specific pattern

by scorpio17 (Canon)
on Mar 23, 2017 at 13:29 UTC ( [id://1185631]=note: print w/replies, xml ) Need Help??


in reply to Parse string and extract word after specific pattern

my $string = "stash_ST1.2.3.4_1.ROLLBACK.check.20170228-101051.435944. +txt"; # find one or more not "." between pair of "."s following word ROLLBAC +K my ($word) = $string =~ m/ROLLBACK\.([^\.]+)\./; print "$word\n"; # prints "check"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-19 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found