F
Francesco Moi
Hello.
I've got a string with some words inside, and I'm trying to replace
'select' to 'choose'.
---------------------------------------------
$mytext = "select push enter selected";
$mytext =~ s/select/choose/g;
print $mytext;
-----------------------------------------------
But sometimes, my string can content 'selected' and it's replace
to 'choosed'.
I would like to replace only the words 'select ' or ' selected' (note
the space after and before 'select'), but I'm not able to find the
way using regexps.
Does anybody have any experience? Thank you very much, and best regards.
I've got a string with some words inside, and I'm trying to replace
'select' to 'choose'.
---------------------------------------------
$mytext = "select push enter selected";
$mytext =~ s/select/choose/g;
print $mytext;
-----------------------------------------------
But sometimes, my string can content 'selected' and it's replace
to 'choosed'.
I would like to replace only the words 'select ' or ' selected' (note
the space after and before 'select'), but I'm not able to find the
way using regexps.
Does anybody have any experience? Thank you very much, and best regards.