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

正则报错,该如何处理

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:43:21
Original
1347 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
Latest Issues
How to register, I want to register
From 1970-01-01 08:00:00
0
0
0
Why can't I register this account? teacher
From 1970-01-01 08:00:00
0
0
0
Don't understand $register=<<<'FORM'
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template