我想计算(在单个正则表达式中)字符串开头的所有空格.
@H_404_12@我的想法:
$identSize = preg_match_all("/^( )[^ ]/",$line,$matches);
例如:
$example1 = " Foo"; // should return 1 $example2 = " Bar"; // should return 2 $example3 = " Foo bar"; // should return 3,not 4!