Tried putting$linkRef = preg_replace( array('/^.*\[/','/\].*$/','/ line /'), array('txmt://open?url=file://','', '&line='), $message);which works as far as the links go, but throws a distinct wobbly in terms of scope within TM after that delimited open square bracket \[.