Home > Backend Development > PHP Tutorial > tags - PHP matching tags regular expression

tags - PHP matching tags regular expression

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-04 09:19:04
Original
1244 people have browsed it

Requirements:
1. Tags can contain double-character bytes (including Chinese), numbers, letters, underscores, and dashes. Each tag can have a maximum of 12 characters;
2. Tags are separated by English commas, with a maximum of 5 tags.

<code>/^([\x00-\xffA-Za-z0-9_]+)(,[\x00-\xffA-Za-z0-9_]+){0,4}$/u</code>
Copy after login
Copy after login

This is not correct, please write it correctly.

Reply content:

Requirements:
1. Tags can contain double-character bytes (including Chinese), numbers, letters, underscores, and dashes. Each tag can have a maximum of 12 characters;
2. Tags are separated by English commas, with a maximum of 5 tags.

<code>/^([\x00-\xffA-Za-z0-9_]+)(,[\x00-\xffA-Za-z0-9_]+){0,4}$/u</code>
Copy after login
Copy after login

This is not correct, please write it correctly.

Related labels:
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
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
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