<?php $str = 'C000000001204';$str = preg_replace('/^(\D*)0*/', '$1', $str); echo $str;
Standard input is empty
C1204
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!