English 中文(简体)
PHP检查了2人、8个char和1个资本。
原标题:PHP check that string has 2 numbers, 8 chars and 1 capital

我发现,为确定间隔时间,有多种办法,有一封信件或数份,但我如何确定其中是否有2份说明?

我试图确认一个口号。

  • 确实有8个性

  • 其中必须写上上信。

  • 其中2人必须是人数

是否有一条线解决办法?

问题回答
if (preg_match(
     /^            # Start of string
    (?=.*p{Lu})   # at least one uppercase letter
    (?=.*d.*d)   # at least two digits
    .{8}           # exactly 8 characters
    $              # End of string
    /xu ,     
    $subject)) {
    # Successful match

rel=“noretinger”>lookahead claim。 如果某一reg鱼能够与目前的状况相匹配,但实际上确实消费了其中的任何部分,那么你就可以把其中几个人放在一行。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签