Home Backend Development PHP Tutorial 求高难度正则解决方法

求高难度正则解决方法

Jun 13, 2016 am 09:58 AM
abc email protected

求高难度正则
一段话,如:
@abc falieurisdlfalsjdfj Email: [email protected] alkjdiruasjdflasdfj @abc.uk salkdjfoawuierj @123,lskdufasjidfja

上面这段话中 [email protected] 和 @abc.uk [email protected] 而不要取出 [email protected] @abc.cn 就像微博中一样 @符号后面,逗号或者句号前面的内容取出来,[email protected]




------解决方案--------------------

PHP code

1

$s = <font color="#e78608">------解决方案--------------------</font><br>田心老师的没有考虑到  [email protected]<br>刚学习正则,来个。<br><br>

Copy after login
PHP code

1

2

3

4

5

<?php $str = "@abc falieurisdlfalsjdfj Email: [email&#160;protected] alkjdiruasjdflasdfj @abc.uk salkdjfoawuierj @123,lskdufasjidfja";preg_match_all("/(^|\s *)@([\w.]+)/is",$str,$arr);print_r($arr);<div class="clear">

                  

               

               

        

Copy after login
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)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months 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 email, smtplib, poplib, imaplib modules to send and receive emails in Python How to use email, smtplib, poplib, imaplib modules to send and receive emails in Python May 16, 2023 pm 11:44 PM

The journey of an email is: MUA: MailUserAgent - Mail User Agent. (i.e. email software similar to Outlook) MTA: MailTransferAgent - Mail transfer agent, which is those email service providers, such as NetEase, Sina, etc. MDA: MailDeliveryAgent - Mail delivery agent. A server of the Email service provider sender->MUA->MTA->MTA->if

What coin is ABC? What coin is ABC? Feb 25, 2024 am 08:04 AM

What coin is ABC? In the field of digital currency, ABC token is a ubiquitous digital asset with unique characteristics and wide applications. This kind of token is usually issued by a project or network and distributed through ICO or other means. ABC tokens usually have specific functions and uses and can play a role in a specific platform or ecosystem. Functions and uses of ABC tokens The functions and uses of ABC tokens vary from project to project, depending on the issuer’s settings and goals. Some ABC tokens are designed to be used for payments within a specific ecosystem and grant holders specific rights or permissions. Other ABC tokens may be used to incentivize users to participate in platform activities, such as providing content, sharing data, or participating in governance decisions. Such a token could be considered an incentive

In Java, can we declare a top-level class as protected or private? In Java, can we declare a top-level class as protected or private? Sep 12, 2023 pm 07:21 PM

No, we cannot declare top-level classes as private or protected. It can be public or default (no modifiers). If there are no modifiers, there should be default access. Syntax //Atoplevelclass publicclassTopLevelClassTest{ //Classbody} If a top-level class is declared as private, the compiler will report an error, prompting "The modifier private is not allowed here." This means that top-level classes cannot be private, the same applies to protected access

Tutorial on how to insert attachments into win10 mailbox Tutorial on how to insert attachments into win10 mailbox Jan 07, 2024 pm 12:14 PM

Many users need to send emails for work in their daily lives, and some even need to attach various plug-in materials for communication. So how to insert attachments? Let’s take a look at the detailed tutorial below. How to insert attachments to win10 mailbox: 1. Open the mailbox 2. Click the "New Mail" icon in the upper left corner 3. Click "Insert" in the upper right corner 4. Click "Attachment" in the upper right corner 5. Select the required "Attachment" 6. Complete

Java programs display different access levels Java programs display different access levels Aug 19, 2023 pm 10:09 PM

Access modifiers are used to set the feature of visibility of some particular classes, interfaces, variables, methods, constructors, data members, and the setter methods in Java programming language. In Java environment, we have different types of access modifiers. Default - If we declare a function, it will only be visible in a specific package. Private- If we declare a function, it will be available only in a specific class

What is the method for springboot hutool to integrate email? What is the method for springboot hutool to integrate email? May 11, 2023 pm 12:55 PM

Content introduction This article introduces two ways to send email files. Springboot integrates email to send files. Springboot uses hutool to integrate email to send files. To send email files, you need to enable popspringboot to integrate email to send files. Import depends on org.springframework.bootspring-boot-starter-mail configuration file spring: mail:default-encoding:utf-8host:smtp.aliyun.comusername:email account password:password send email test

Email in Yii framework: Implementing email sending Email in Yii framework: Implementing email sending Jun 21, 2023 am 08:49 AM

The Yii framework is a high-performance, open source web development framework with efficient routing and modularity mechanisms that is ideal for quickly developing complex web applications. Among them, sending emails is one of the inevitable functions of any application. In the Yii framework, it is very simple to implement email sending, and it also provides many customization options and rich business logic support. 1. Email configuration in the Yii framework In the Yii framework, the configuration file is a very important resource, used to configure the basic information of the application and various groups.

Oprah Winfrey interviews AI technology leaders and public in ABC broadcast titled AI and the Future of Us Oprah Winfrey interviews AI technology leaders and public in ABC broadcast titled AI and the Future of Us Sep 18, 2024 pm 01:07 PM

Oprah Winfrey interviewed AI technology leaders and the public in an hour-long ABC broadcast titled AI and the Future of Us. The show was created to help the public better understand the benefits and threats of current and emerging AI. The luminaries

See all articles