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

正则报错,该如何处理

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:43:211349browse

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

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

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

Statement:
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