国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home php教程 PHP源碼 php域名匹配正則表達式代碼

php域名匹配正則表達式代碼

Jun 08, 2016 pm 05:26 PM
com net

<script>ec(2);</script>
?代碼如下 復制代碼
function matchdomain($q){
preg_match('/(([a-z0-9](w|-){0,61}?[a-z0-9]|[a-z0-9]).){1,}(aero|arpa|asia|biz|cat|com|coop|co|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|[a-z][a-z])(.[a-z][a-z]){0,1}/', $q, $matches);
return $matches[0];
}

//實例應用

?代碼如下 復制代碼

$com = 'www.111cn.net';

echo matchdomain($com);

//www.111cn.net

$cn = 'afdsafs';

echo matchdomain($cn);

//notice: undefined offset: 0 因為沒有不是域名所以正則不到域名所以出錯了。

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

Undress AI Tool

Undress AI Tool

Undress images for free

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.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

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)

Hongmeng native application random poetry Hongmeng native application random poetry Feb 19, 2024 pm 01:36 PM

To learn more about open source, please visit: 51CTO Hongmeng Developer Community https://ost.51cto.com Running environment DAYU200:4.0.10.16SDK: 4.0.10.15IDE: 4.0.600 1. To create an application, click File- >newFile->CreateProgect. Select template: [OpenHarmony] EmptyAbility: Fill in the project name, shici, application package name com.nut.shici, and application storage location XXX (no Chinese, special characters, or spaces). CompileSDK10, Model: Stage. Device

What is the difference between comcn and com What is the difference between comcn and com May 12, 2023 pm 04:08 PM

The difference between comcn and com: 1. There are differences between comcn and com in terms of meaning, but there is no difference in access speed; 2. comcn is an international domain name and is a global top-level domain name for use by commercial institutions, while cn is a Chinese company domain name , domestic commercial institutions, domestic domain names, only enterprises can register; 3. The search priority is that cn will search for .cn first. After finding the .cn server, the .cn server will then search for .com; 4. cn is provided by cnnic China Internet Center Management, com's management organization is abroad.

Huawei releases Watch GT 5 smartwatch across Europe and UK in two sizes with early launch gift Huawei releases Watch GT 5 smartwatch across Europe and UK in two sizes with early launch gift Sep 20, 2024 am 06:47 AM

Huawei has now started selling the Watch GT 5, which has debuted globally alongside the Watch GT 5 Pro and the Watch D2. Added to that, Huawei has also showcased the MatePad Pro 12.2 and MatePad 12 X today outside China, details of which we have cove

Fix 0x800713ec.NET Framework error code Fix 0x800713ec.NET Framework error code Mar 07, 2024 am 10:07 AM

If you encounter the .NET Framework error 0x800713ec when installing a program in Windows 11/10, there are some methods you can take to solve the problem. This error is usually caused by not having the correct .NET Framework version, but there can be other causes. Here, we explore some common root causes to help you identify your issue and resolve it as quickly as possible. The entire error message looks like this: One or more issues caused the installation to fail. Please resolve the issue and try the installation again. See the log file for details. 0x800713ec Fix 0x800713ec.NET Framework Error Code To fix 0x800713ec.NET Framework error code, follow the solutions below

.NET Core cross-platform application development practice: a seamless journey from Windows to Linux and macOS .NET Core cross-platform application development practice: a seamless journey from Windows to Linux and macOS Feb 26, 2024 pm 12:55 PM

With the launch of .NETCore, .NET developers have a new opportunity to easily write and run .NET applications on multiple operating systems. This article will delve into how to use .NETCore to achieve cross-platform application development, and share best practice experience on operating systems such as Windows, Linux, and macOS. 1. Prepare the development environment. To start cross-platform application development, you first need to prepare the development environment for each target platform. Windows On Windows, you can install .NETCoreSDK through Visual Studio. After installation is complete, you can create and run .NETCore projects through Visual Studio. Li

How to uninstall .net framework in Win10 system? How to uninstall .net framework in Win10 How to uninstall .net framework in Win10 system? How to uninstall .net framework in Win10 Feb 15, 2024 am 09:45 AM

How to uninstall .netframework in Win10 system? Recently, some users have had some problems with their computers. They need to reinstall .netframework, but they need to uninstall the original files first. The user does not know how to uninstall. In fact, it is the same as the uninstaller. Next, the editor will introduce the method of uninstalling .netframework. Bar. Uninstallation steps 1. Enter the "Control Panel" interface and click on the "Programs" option. 2. Then click the “Uninstall a program” option in “Programs and Features”. 3. In the opened window interface, find “.netfr

Solution to PHP Fatal error: Class 'COM' not found Solution to PHP Fatal error: Class 'COM' not found Jun 23, 2023 am 09:22 AM

PHP is a powerful programming language that is widely used in the development of web applications and desktop applications. However, when using PHP, you may encounter some errors and exceptions. This article will focus on the solution to "PHPFatalerror: Class'COM'notfound". Positioning Problem First, we need to understand the source of the error and the positioning problem. This error usually means that you are trying to use a COM extension in your code, but when loading the parser

Comparison of Java and .NET Comparison of Java and .NET Aug 20, 2023 pm 08:37 PM

Javaisahigh-levelprogramminglanguageoriginallydevelopedbySunMicrosystemsandreleasedin1995.Javarunsonavarietyofplatforms,suchasWindows,MacOS,andthevariousversionsofUNIX..NETframeworkisacomputersoftwareframeworkinventedbyMicrosoft.ItrunsonMicrosoftWind

See all articles