On Sunday 20 November 2005 22:27, Ian P. Christian wrote: > If this change included a simple sed command that could be applied to code > to fix 'legacy' code
Sorry, should have included this... For example: $ cat test <?php $moo{3}; $foo = $moo{12}; ?> $ sed -e 's/$\([a-zA-Z][a-zA-Z0-9]*\){\([0-9]*\)}/substr($\1,\2,1)/g' test <?php substr($moo,3,1); $foo = substr($moo,12,1); ?> -- Ian P. Christian ~ http://pookey.co.uk
pgpeOTb4Skv0c.pgp
Description: PGP signature