if (/\/) { $input =~ $your_substitution_regex; }