开发者

regex for number between two underscores

I开发者_开发百科 am trying to find the number between two underscores (_) in this string

234534_45_92374
3433_9458_034857
zx_8458_047346daf

what would be the regex for this?


preg_match('/_(\d+)_/', $str, $matches);
$number = (int) $matches[1];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜