Mysql Regular Expression

Source: Internet
Author: User

Mysql Regular Expression

Regular ^ match the start part of the string $ match the end part of the string. represents any character in the string, including carriage return and line feed [Character Set combination] matching any character in "Character Set combination", such: [a-z0-9] [^] matches any character other than character set combination S1 | S2 | S3 matches any one of S1, S2, and S3 * represents before multiple symbols, including 0 and above + represents multiple characters before the symbol, including 1 and more {N} strings appear N times {M, N} strings appear at least M times, N times at most: select * from info where name REGEXP '^ l'; matching example starting with L: select * from info where name REGEXP' [ceo] '; match any of the three letters: select * from info where name REGEXP 'a * C'; matching a may not exist. + indicates at least one occurrence. Example: select * from info where name REGEXP 'AB {1, 3}'; a record that matches string B at least once. A record with a maximum of three times: select * from info where name REGEXP '(AB) {1, 3} '; match the AB string at least once, a maximum of 3 records. If the record appears more than 3 times, it will be retrieved because it appears three times

Related Article

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.