[英]Creating regular expression in php
My attempt 我的尝试
preg_match("/^logs.\d{24}.\d{24}.{4}$/", $input_line, $output_array);
If matched return \d{24} in echo
String 串
logs/532523532543353444444444/532523532543353444444444.log
Preg match peseudo-code : logs/{24 digitals}/{same24digits}.log
Preg match伪代码: logs/{24 digitals}/{same24digits}.log
Both \\d{24}
are the same number 两个\\d{24}
是相同的数字
Question How to get the : If matched return \\d{24} in echo 问题如何获取:如果匹配,则在回显中返回\\ d {24}
logs\/(\d{24})\/\1.log
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.