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

正则报错,该如何处理

Jun 13, 2016 pm 01:17 PM
login match profile

正则报错
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 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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use Flask-Login to implement user login and session management How to use Flask-Login to implement user login and session management Aug 02, 2023 pm 05:57 PM

How to use Flask-Login to implement user login and session management Introduction: Flask-Login is a user authentication plug-in for the Flask framework, through which we can easily implement user login and session management functions. This article will introduce how to use Flask-Login for user login and session management, and provide corresponding code examples. 1. Preparation Before using Flask-Login, we need to install it in the Flask project. You can use pip with the following command

What is linux .profile What is linux .profile Mar 22, 2023 am 10:17 AM

linux.profile is a file about Linux environment variables; after each user logs in to the system, he will have a dedicated operating environment, and users can customize their own operating environment by modifying the corresponding system environment variables; in " /etc/profile" file will affect all users.

How to profile Centos6.6 system? How to profile Centos6.6 system? Jan 07, 2024 pm 12:18 PM

During this period of time, I used volatiletiy to do work related to memory analysis. Since I was doing it on Centos, I needed to create a CentOs profile. I checked volatile's official website and other forums but couldn't find a direct solution. Finally, I tried various methods to find a solution. 1. The first thing is to install the dwarfdump tool. Generally, this is not included in the CentOs source, so you need to download it yourself. First install: yuminstallelfutils-devel and then get the source file of dwarfdump: wget'http://www.prevanders.net/libdwarf-20140413.t

Match matching method in java Match matching method in java Apr 28, 2023 pm 10:31 PM

Note that match is used for matching operations, and its return value is of boolean type. Through match, you can simply verify whether a certain element exists in the list. Example // Verify whether there is a string in the list starting with a, and match the first one, that is, return truebooleananyStartsWithA=stringCollection.stream().anyMatch((s)->s.startsWith("a"));System.out .println(anyStartsWithA);//true//Verify whether the string in the list

Flask-Login: User authentication in Python web applications Flask-Login: User authentication in Python web applications Jun 17, 2023 am 08:50 AM

Flask-Login: User Authentication in Python web applications Security and user authentication are an integral part of Python-based web application development. Flask-Login is an excellent Python library that helps developers easily add authentication functionality to their Flask applications and provides a simple and flexible way to handle user login and logout. This article will introduce you to the basics of Flask-Login

How does SpringBoot realize configuration switching in different environments through Profile? How does SpringBoot realize configuration switching in different environments through Profile? May 10, 2023 pm 07:16 PM

SpringBoot uses profiles to implement configuration switching in different environments, such as common development environments, test environments, and production environments. There are two main types of commonly used configuration files in SpringBoot: properties files and yml files. For properties files, it is mainly implemented through multiple profile configuration files; for yml files, it is mainly implemented through multiple fragments (configuration fragments are divided by three horizontal bars in a yml file). Profile is more convenient to use in actual work. After the SpringBoot program is developed, it will eventually be packaged into a jar package for use. We can put the configuration file externally.

How to use regular expressions to match strings in Java? How to use regular expressions to match strings in Java? Apr 19, 2023 pm 02:37 PM

Concept 1. Various Match operations can be used to determine whether a given Predicate meets the elements of a Stream. 2. Match operation is a terminal operation and returns a Boolean value. Instance booleananyStartsWithA=stringCollection.stream().anyMatch((s)->s.startsWith("a"));System.out.println(anyStartsWithA);//truebooleanallStartsWithA=stringCollection.stream().

How to use java Match How to use java Match Apr 18, 2023 pm 01:55 PM

Concept 1. Various Match operations can be used to determine whether a given Predicate meets the elements of a Stream. 2. Match operation is a terminal operation and returns a Boolean value. Instance booleananyStartsWithA=stringCollection.stream().anyMatch((s)->s.startsWith("a"));System.out.println(anyStartsWithA);//truebooleanallStartsWithA=stringCollection.stream().

See all articles