佚名通过本文主要向大家介绍了正则表达式,正则表达式提取数字,数字 正则表达式,html正则表达式,java正则表达式等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题:求个正则表达式
描述:
解决方案1:
描述:
[quote]3333[/quote]
匹配quote,然后把之间的内容都提取出来
用php~
解决方案1:
只要quote中间部分的话
$matches = [];
$re = "/\\[quote\\](\\S*?)\\[\\/quote\\]/";
$str = "[quote]3333[/quote]\n";
preg_match($re, $str, $matches);
print_r($matches);