in reply to Re: Regex not working
in thread Regex not working

Maybe $text actually has newlines in it and you need to add the /s modifier? Also, bracketing regex delimiters are more readable.
$text =~ s{...}{...}igs;