模式:Activity
字符串:"/CN=(.*)\,/"
我试图在文本之后的CN=João Pedro Mantovani,OU=host,DC=ghw,DC=college,DC=br
和第一个CN=
之间获取文字,但我获取所有内容直到最后一个逗号
,
我如何才能获得array(
0 => CN=João Pedro Mantovani,OU=host,DC=ghw,DC=college,
1 => João Pedro Mantovani,OU=host,DC=ghw,DC=college
)
和第一个CN=
之间的文字?在这种情况下,,
答案 0 :(得分:0)
添加" ?
"对于内在模式,它将变得非贪婪
尝试/CN=(.*?)\,/
结果可能是你想要的。