Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
i am trying to fetch a value from a string after _ using regex and try to store that value in a variable that i can use somewhere else, like below....also we can have any number in place of 5 like 8, 9 , 10 or 20
my $job = "50.10-d557_5"; my $Path = ""; $path = /home/data/5/file1.log
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex to extract value from a string (updated)
by AnomalousMonk (Archbishop) on Jul 01, 2020 at 07:10 UTC |