Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
问题似乎很简单,我需要一个正则表达式来匹配一些类似这样的短语:
“/产品/12/节目”
我知道它可能喜欢
“/产品/\d+/显示”
但是当应用于php函数preg_match时它失败了,任何想法
$your_string_to_match = "/product/12/show"; if (preg_match('#^/product/\d+/show#', $your_string_to_match)) { // matched }