in reply to Re: Extract Sub String
in thread Extract Sub String
if ($string =~/(\w+)(_RVCT)/)There is no need for the capturing parentheses around _RVCT:
use warnings; use strict; my $string = "Viood_ram_shiva_RVCT22"; if ($string =~ /(\w+)_RVCT/) { print "The file name is $1. "; }
|
|---|