Evaluate the php regular expression to match the output with three identical characters: yes

Source: Internet
Author: User
Tags php regular expression
If the php regular expression matches three identical characters, the output is as follows:
$ Str = "me and I ";

There are 3 identical words
Echo 'yes ';


$ Str2 = "I am a great guy ";

There are 3 identical words
Echo 'yes ';




$ Str3 = "12333456 ";

There are 3 identical words
Echo 'yes ';


I don't know what the character is! It must contain three identical characters.
Method! Best Regular Expressions


Reply to discussion (solution)

$ Str2 = "I am a great guy"; if (preg_match ('/(. +) \ 1 {2}/', $ str2) echo 'yes ';

Thank you very much!

How can I collect the data from the following Station? Only the data is returned. I tried it multiple times and it failed. I don't have much points available for help. Thank you!
Https://estore.heilind.com/search.asp? P = 7652

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.