Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Parse string and extract word after specific pattern

by scorpio17 (Canon)
on Mar 23, 2017 at 13:29 UTC ( #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
Node Status?
node history
Node Type: note [id://1185631]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2019-10-15 03:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?