<?php $text = "0abc123";preg_match('/^[^a-z]*(?=[a-z])/i', $text, $m);echo isset($m[0]) ? strlen($m[0]) : false;
Standard input is empty
1
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!