Syntax for regular expressions in PHP

Source: Internet
Author: User

Three ways to write a delimiter:

Regexpal tool (positive regular expression debug tool):

The results can be displayed in real time.

Atomic:

Visible Atom, which is a character in the Uincode encoded table

Invisible atoms:

In order to avoid coding problems resulting in incorrect matching, to convert the text into Unicode encoding transcoding in the match , so there is no GBK\UTF encoding such as the mismatch problem.

How to filter the atoms of metacharacters:

|: or the meaning of

"": Indicates that any of the characters that appear inside will be matched. For example:

"^": match the inside of the atom, with "" instead, the format can only be so "^, change ^ position will change the meaning ." For example:

In addition to 789, the others are matched to!!!!

Multiple matches, with slices matching A-Z, A-Z, and 0-9.

Syntax for regular expressions in PHP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.