[英]preg_match_all between backslash
trying to extract data between two backslashes 试图在两个反斜杠之间提取数据
read that a literal backslash must be 4... Why 4 Backslashes? 读到字面上的反斜杠必须为4 ...为什么是4个反斜杠? Yes, it seems crazy to have to use 4 backslashes just to match one literal backslash! 是的,为了匹配一个字面反斜杠而不得不使用4个反斜杠似乎很疯狂!
but not working: 但不起作用:
preg_match_all("/imgurl75/\\\/(.*?)/\\\//is", $data, $matches);
trying to extract data between both backslahs \\ imgurl75\\ http://www.example.com/dir/dir/img.ext \\ 尝试提取两个backslahs之间的数据\\ imgurl75 \\ http://www.example.com/dir/dir/img.ext \\
preg_match_all("#imgurl75\\\\(.*)\\\\#", $data, $matches);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.