- preg_replace: documentation ( source)
<?php
$srcTxt = "
|title=
|Row18={{Timeline row
|from=
|to=2000
|1-text= TYRR consolidation
|1-at= 1904
|2-text= TYRR and TFC takeover
|2-at= 1927
|3-text= private bus services acquisition
|3-at= 1954
|Row18={{Scale row|
|from=1840
|to=2000
|increment=40
}}
}} ";
$srcTxt = preg_replace("/^( )?\|([a-z]+)=$/m", "", $srcTxt);
echo ($srcTxt);
?>