One, what can this do?
Tests the pattern within a string.For example, you can test the input string to see if there is a phone number pattern or credit card number pattern within the string. This is called data validation.
PHP Math function Summary (classic worth collecting), PHP is worth collecting
This paper summarizes and analyzes the mathematical operation function of PHP. Share to everyone for your reference, as follows:
First, the common function
1. Basic knowledge of regular expressionsMeaning: A string pattern consisting of ordinary characters and (A-Z) and some special character
function: Validation.
Replace the text.
Extracts a substring from a string.
Category: POSIX and Perl
POSIX
[Regular expression] text box input content controlInteger or decimal: ^[0-9]+\. {0,1} [0-9] {0,2}$Only numbers can be entered: "^[0-9]*$".Only n digits can be entered: "^\d{n}$".Only numbers with at least n digits can be entered: "^\d{n,}$".You can
In-processA way of counting. The focus is on how many times a count is in.1) C language can be recognized in the system
Binary
Every bit. 0 0 1 0 0 1 1 0 1 0 1 0 0 1 0 1 1 0In the C language, the way to write a binary number is
1. Regular grammar
character
Description
\
Marks the next character as a special character, text, reverse reference, or octal escape. For example, "n" matches the character "n". "\ n" matches the line break. The
CharactersMeaning: For a character, it is usually expressed as literal meaning that the next character is a special character and is not interpreted.For example:/b/matches the character ' B ', by adding a backslash in front of B, which is/b/, the
Reprinted from: Http://www.jb51.net/article/40559.htm, thanks to the original author.The following are the bit operators in C: With, or, XOR, inverse, left and right shift are described in detail, the need for friends can come to the referenceA
Metacharacters
Describe
\
The next character marker, or a backward reference, or an octal escape character. For example, "\\n" matches \ n. "\ n" matches the line break. The sequence "\ \" matches "\" and "\ (" Matches "(".
The return value is 0 when using parseint (08), parseint (09) For integer conversions in JavaScript.Tools/Materials
Browser
Text Editor
Method/Step
In JavaScript, when converting integers using parseint (08), parseint (09), the return
No matter what language, the regular expression of the processing methods are very flexible and efficient, especially for some strings of the crawl, filtering aspects, more obvious advantages.Regular expressions are often simpler to do, and a few
1, first look at a list of built-in functions:1.abs () function This function is used to return the absolute value of a variable1>>> a=-32>>> b=ABS (a)3>>>Print(type (b), b)4class 'int'> 35>>> c=-6+7j6>>> d=ABS (c)7>>>Print(Type (d), D)#here is the
A line break matches a newline character. Equivalent to \x0a and \CJ.+ \ R matches a carriage return character. Equivalent to \x0d and \cm.The \s matches any whitespace character, including spaces, tabs, page breaks, and so on. equivalent to [\f\n\r\
Where to insert JavaScriptJavaScript can appear anywhere in HTML. Use the tag : you can insert JavaScript anywhere in the HTML document, or even before . However, if you want to insert a file in the webpage of the declared framework (the webpage of
There are three functions that can convert non-numeric values into numeric values: Number (), parseInt (), and parseFloat (). The first function, that is, the transformation function Number (), can be used for any data type, and the other two
Where to insert JavaScriptJavaScript can appear anywhere in HTML. Use the tag : you can insert JavaScript anywhere in the HTML document, or even before . However, if you want to insert a file in the webpage of the declared framework (the webpage of
ParseInt (string, radix) has two parameters. The first string is the input value, and the second radix is the input value. The parameter radix can be ignored. The default value is 10, convert the numbers in hexadecimal notation to a decimal INTEGER (
PHP preg_replace () Regular replacement, unlike JavaScript regular substitution, PHP preg_replace () is the default is to replace all symbol matching conditions of the elements need our program processing data is not always pre-designed database
Basic knowledge of regular expressions:\ marks the next character as a special character, or a literal character, or a backward reference, or an octal escape character.For example, ' n ' matches the character "n". ' \ n ' matches a line break. The
Learn the PHP conversion, there are a lot of knowledge points, logic, but also the most primitive written calculation, but we are accustomed to use code to implement the conversion, the conversion code is as follows: binary (BIN) octal (Oct) decimal
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.