需要UNIX正则表达式来提取从4到8的字母.
例如:文件15870712.iis如果我们想提取第3个数字,我们可以给'^([0-9] [0-9] [0-9])'> 158
我需要第5个6th 7th和8th chara.> 0712
$letters = substr($string, 4, 4);
Run Code Online (Sandbox Code Playgroud)
它不使用正则表达式,但确切地说,你想要的是什么.根据您的问题,绝对不需要复杂的模式匹配.
| 归档时间: |
|
| 查看次数: |
5224 次 |
| 最近记录: |