$string =~ s/##\s*(.*?)\s*##/##$langhash{$1}##/s [download]
In reply to Re^2: substitution not working correctly by ikegami in thread substitution not working correctly by qnguyen