Why is the PHP regular match unsuccessful? Help

Regular PHP if (Preg_match ("^[a-za-z][a-za-z0-9_\-]{5,19}$", "abc-mmm")) echo "true"; else echo "false"; ?> Want to verify the regular expression of the account, the beginning of the letter, allow numbers, letters, underscores, minus, 6-20

PHP Regular matching problem!

$str = The theory My Myselef Your Yourselef STR; $reg = '/^ ([a-za-z]+) \s*\1[a-za-z]*$/m '; Preg_match_all ($reg, $str, $result); Var_dump ($result); ?> Here is the result of the match, I don't quite understand why only the last one is matched

String transcoding problems

Utf-8 GBK $str = "BLACK";This string I checked with the mb_detect_encoding function is UTF-8 encoded,$s 1 = iconv (' utf-8 ', ' GBK ', $string);$s 1 = mb_convert_encoding ($string, "GBK", "UTF-8"); I use the above two methods to transcode, the

What is the best way to use the album feature?

Now there is a need to put the user comments in the picture automatically categorized as user photo album to facilitate other users to browse, previously there is a picture address in the database, if every time you view the album will query the

Has anyone ever done a collection of odd art videos?

Title Sina Weibo can collect video information through the URL of Qi Yi. Look for the information on the internet like the odd art no open API URL is also encrypted processing. Ask twos, the great God who has done it. Reply to discussion

Questions about how PHP gets the Ajax value ....

Now you have the following questions 1, on the test.php page there is a , test as follows: 10 20 30 Then there is a variable on this page $arr Now I want to assign the value of option to $arr, and change the value of $arr every

PHP Log in operation

To log user login logs, the table is as follows: Table Name: Users_logsID: Auto IncrementIP: IP address with?Username: With a nameLogintime:datetime (e.g. 2014-02-13 10:18:01)Type: operation type (e.g. login)Descriptions: Description (e.g. user

About Eval () always making mistakes

PHP eval () ' + ', ' name ' = ' Kuke ', ' time ' = ' ' 1024x768 ', $res = "1+3"; Var_dump ($res); $v =eval ($res); Var_dump ($v); Echo $v; foreach ($v as $key = + $val) {echo $key. = ". $val;} -------------------------------------------echo "";

Questions about the PHP array

Array: 111:222 333:444 555:666 How to use PHP reorganization to the following 111:222 333:444 555:666 Please the master function how to write help write thank you. Reply to discussion (solution) Please output the array prototype to

string equality Reason

Ask, why does PHP think that two strings are equal? if ("03E-004611" = = "36E-008026") echo ' equal '; Reply to discussion (solution) This post was last edited by xuzuning on 2014-02-08 17:10:29 Var_dump ("03E-004611" = = "36E-008026"); BOOL (

Win under the Httpd.ini rules how to write more concise, help!

[isapi_rewrite]# defend your computer from some worm attacks#rewriterule. * (?: global.asa|default\.ida|root\.exe|\.\.). * . [f,i,o]# 3600 = 1 hourcacheclockrate 3600RepeatLimit 32# Protect Httpd.ini and httpd.parse.errors files# from accessing th

Beginner's question, HTML prompt tag in PHP does not close error

This post was last edited by Figer on 2014-01-28 15:44:49 I used eclipsephp Studio, and found that some of the downloaded HTML code would appear with an error message, such as the following:Page Auto "> Jump Will prompt:The start tag is not closed.

A strange 404 question, do not know if there is a problem with the server

I gave it to Fckeditor2. X wrote a plugin and put it on the web for everyone to test. Http://gufa.xp3.biz used to be ad-free, and is now forced to join the ad, causing it to not work. If you have a cow installed on your computer, you can use it

PHP gets HTML form data cannot be written to MySQL database

MySQL Database form PHP Introduction, in the attempt to write a library database, database write some problems Total interface Module Book entry data Processing-collection Approve preview data ' Echo ' CIP book in the catalogue: '.

Filter repeat + page turn issues

My item number is duplicated, first to filter out duplicate records the item number shows one. then pagination. Now the problem is that the filter is done, but I do the first page, then filter, the results of each page is not as many, Set 80, some

PHP Close browser triggers link code

The problem with the PHP site is to directly close the browser is also displayed online status, only click on the safe exit to show the offline status, there is no code in the direct shutdown browser automatically triggered by the security exit link

About Dedecms Dream, modify the template in the background

Yesterday I want to through the background, template---template management in the default editor index.htm home file, after changing the point to save, prompted to modify the success. Look at the first page when the same, and then edit the home file,

Report HTTP500 error when connecting to database

HTTP500 Error Operating environment is: iis7.0+php5.32+sql2005 Open PHP Web page is normal, connected to the database, reported HTTP500 error. Find a solution. The code for connecting to the database is as follows: Link Database $conn

Regular Expression exclusions

If I now have the following lines of data: "Hello, I am the World" "Hello,my name is" "Address is: http://www.baidu.com" I want to extract a line that does not contain an "http" string, that is, the first two lines, how do you write a regular

How to judge is not Pravite function??

For example, the CI framework, we invoke the pravite decorated function from the controller on the URL. It will jump to the 404_error interface. How is it implemented? Reply to discussion (solution) A private method function cannot be accessed

Total Pages: 5208 1 .... 4838 4839 4840 4841 4842 .... 5208 Go to: GO

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.