Home  >  Article  >  Backend Development  >  正则擒获的疑问

正则擒获的疑问

WBOY
WBOYOriginal
2016-06-13 12:42:35901browse

正则捕获的疑问?
$str="a1234a";
$preg="/(\d){4}/i";

上面能够匹配4个连续的数,
那么里面的子表达式捕获的



是1(一个子表达式)?
还是1324(一个子表达式)?
还是1、2、3、4(四个子表达式)?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn