Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex URL路径排除重写规则的正则表达式中的某些sting_Regex - Fatal编程技术网

Regex URL路径排除重写规则的正则表达式中的某些sting

Regex URL路径排除重写规则的正则表达式中的某些sting,regex,Regex,如何为以/a/开头但不包括字符串/dk的任何路径修改下面的正则表达式/ 所以/a/remove可以匹配,但是/a/dk/remove不能匹配 (^(?!.*(?:/dk/|/fl/))/a/(.*)$) 如果我们也不想匹配/a/fl/remove,您可以为相同的内容添加前瞻。更多信息 (^(?!.*(?:/dk/|/fl/))/a/(.*)$)

如何为以/a/开头但不包括字符串/dk的任何路径修改下面的正则表达式/

所以/a/remove可以匹配,但是/a/dk/remove不能匹配

(^(?!.*(?:/dk/|/fl/))/a/(.*)$)

如果我们也不想匹配/a/fl/remove,您可以为相同的内容添加前瞻。

更多信息
(^(?!.*(?:/dk/|/fl/))/a/(.*)$)