See How (Not) To Ask A Question. Your question is very unclear. For example what do you mean "run it from within the file"? What's in $line?
If $line indeed contains just a single line as the variable name suggests, the regex will never match, because it requires multiple lines in the same string.
In reply to Re: String replace, another question
by moritz
in thread String replace, another question
by heeru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |