in reply to s/// operator
$test = "mouse_eatsCat_andDog.txt"; $test =~ s/"_(.+)"/$1/; #because I want to get "eatsCat_andDog.txt"
Your string doesn't contain a quote(") followed by an underscore(_), so your regex never matches.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: s/// operator
by perlUser345 (Acolyte) on Nov 19, 2015 at 19:25 UTC |