Home > Backend Development > PHP Tutorial > 正则报错,该如何处理

正则报错,该如何处理

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:17:00
Original
1164 people have browsed it

正则报错
preg_match() [function.preg-match]: Compilation failed: unmatched parentheses at offset 44

正则是这么写的:
^(register|setting|login|profile)[\/([a-z]+)]*$
请问有什么问题

------解决方案--------------------
[] 不能嵌套
------解决方案--------------------
^(register|setting|login|profile)(\/([a-z]+))*$

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template