


Pattern Modifiers - Modifiers for regular expressions_PHP Tutorial
Pattern Modifiers - Modifiers for regular expressions
The following are the modifications available in the current regular expression. The names in brackets are the internal PCRE names of those modifiers. i (PCRE_CASELESS) m (PCRE_MULTILINE) If this modifier is set, the line start and line end structures match the current position of any new line in the target string after or before the current position, as well as every start and end. This is equivalent to /m in Perl Modifier. If the target string does not have "n" characters, or there is no ^ or $ in the pattern, this modifier has no effect. s (PCRE_DOTALL) x (PCRE_EXTENDED) e Use this modifier only in preg_replace(); other PCRE functions ignore it. A (PCRE_ANCHORED) D (PCRE_DOLLAR_ENDONLY) S U (PCRE_UNGREEDY) Extension. By default, in Perl, meaningless characters after a backslash are treated as normal literals. There are currently no other control features
If this modifier is set, the expression is not case-sensitive.
By default, PCRE considers the target string value to be a single-line string (even if it does contain multiple lines). The line start mark (^) only matches the beginning of the string, and the line end mark ($) only matches the end of the string, or an end line (unless the E modifier is specified). This is the same as in Perl.
If this modifier is set, a "dot" in the pattern will match all characters, including newlines. Without it, newlines will be excluded. This modifier is equivalent to /s in Perl Modifier. An opposite type, such as [^a] will always match a newline character, regardless of the modifier's restrictions.
If this modifier is set, all whitespace clauses in the pattern will be ignored unless an escape character or an internal type of a character is used, and all unescaped characters outside of the character type The characters between the # signs are also ignored. This is equivalent to the /x modifier in Perl, which allows comments to be added to complex patterns. Note that this only applies to data characters. Space characters will not be in the specified order of pattern characters. appears in.
If this modifier is set, preg_replace() will perform normal substitutions involving in the replacement value, the same as in PHP code, and then use it to replace the searched string.
If this modifier is set, the pattern is forced to be anchored, that is, it matches the value to the beginning of the search string. This effect can be achieved through the appropriate pattern structure itself , that's the only way in Perl.
If this modifier is set, the $ modifier in the pattern will only match the end of the target string. Without this modifier, the $ character will also match the end of the new line (but no longer before a new line). This modifier is ignored if the m modifier is set. There is no equivalent in Perl.
If a pattern will be used multiple times, use a longer time to analyze it to improve the speed of matching. If this modifier is used, additional analysis is performed. Currently, the research mode is only used for non-anchors Pattern, does not have a fixed starting character.
This modifier flips the "greediness" of the amount so that it is not greedy by default, but can be greedy if you follow it with a question mark (?). This is not compatible with Perl. This can also be passed The (?U) modifier inside the pattern gets.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to set up keyboard startup on Gigabyte's motherboard. First, if it needs to support keyboard startup, it must be a PS2 keyboard! ! The setting steps are as follows: Step 1: Press Del or F2 to enter the BIOS after booting, and go to the Advanced (Advanced) mode of the BIOS. Ordinary motherboards enter the EZ (Easy) mode of the motherboard by default. You need to press F7 to switch to the Advanced mode. ROG series motherboards enter the BIOS by default. Advanced mode (we use Simplified Chinese to demonstrate) Step 2: Select to - [Advanced] - [Advanced Power Management (APM)] Step 3: Find the option [Wake up by PS2 keyboard] Step 4: This option The default is Disabled. After pulling down, you can see three different setting options, namely press [space bar] to turn on the computer, press group

1. Processor When choosing a computer configuration, the processor is one of the most important components. For playing games like CS, the performance of the processor directly affects the smoothness and response speed of the game. It is recommended to choose Intel Core i5 or i7 series processors because they have powerful multi-core processing capabilities and high frequencies, and can easily cope with the high requirements of CS. 2. Graphics card Graphics card is one of the important factors in game performance. For shooting games such as CS, the performance of the graphics card directly affects the clarity and smoothness of the game screen. It is recommended to choose NVIDIA GeForce GTX series or AMD Radeon RX series graphics cards. They have excellent graphics processing capabilities and high frame rate output, and can provide a better gaming experience. 3. Memory power

Glodon Software is a software company focusing on the field of building informatization. Its products are widely used in all aspects of architectural design, construction, and operation. Due to the complex functions and large data volume of Glodon software, it requires high computer configuration. This article will elaborate on the computer configuration recommendations of Glodon Software from many aspects to help readers choose a suitable computer configuration processor. Glodon Software requires a large amount of data calculation and processing when performing architectural design, simulation and other operations. Therefore, the requirements for the processor are higher. It is recommended to choose a multi-core, high-frequency processor, such as Intel i7 series or AMD Ryzen series. These processors have strong computing power and multi-thread processing capabilities, and can better meet the needs of Glodon software. Memory Memory is affecting computing

SPDIFOUT connection line sequence on the motherboard. Recently, I encountered a problem regarding the wiring sequence of the wires. I checked online. Some information says that 1, 2, and 4 correspond to out, +5V, and ground; while other information says that 1, 2, and 4 correspond to out, ground, and +5V. The best way is to check your motherboard manual. If you can't find the manual, you can use a multimeter to measure it. Find the ground first, then you can determine the order of the rest of the wiring. How to connect motherboard VDG wiring When connecting the VDG wiring of the motherboard, you need to plug one end of the VGA cable into the VGA interface of the monitor and the other end into the VGA interface of the computer's graphics card. Please be careful not to plug it into the motherboard's VGA port. Once connected, you can

Please recommend which 1155-pin CPU is the best. The current 1155-pin CPU with the highest performance is Intel Corei7-3770K. It has 4 cores and 8 threads, a base frequency of 3.5GHz, and supports TurboBoost2.0 technology, which can reach up to 3.9GHz. In addition, it is equipped with 8MB of level 3 cache and is an excellent processor with the LGA1155 pin, the most powerful CPU Intel Core i73770K. The LGA1155 interface is the interface type used by second and third generation Core processors. The best performing one is Intel Core i73770K. The parameters of this processor are as follows: 1. Applicable type: desktop; 2. CPU series: Core i7; 3. CPU

Which version of the graphics card driver is best to use? 1. There is no absolute best version. It is most important to choose the version that suits your computer; 2. Because the applicability and stability of the graphics card driver version are related to the computer hardware environment and system configuration; 3. You can check the detailed information of the computer and graphics card on the official website, select the appropriate driver version based on the information, or refer to the reviews of other users. It is recommended to back up the system before installing the driver to avoid unexpected situations. Graphics card driver version 472.19 series is an excellent choice. Currently, the driver compatibility of version 472 is the best. Installing version 472 of the driver can also maximize the performance of the graphics card. The NVIDIA graphics card driver Win7 installation version, numbered 2, 472.19, is a product with remarkable quality.

I am planning to go backpacking in Tibet. ① How many liters of bag should I carry? Please tell me what you think is the best configuration. I am 170 and have good physical strength. The first time I went hiking, the amount was 60 liters or more. The amount of hiking was less than 60 liters. The entire journey was by car. You don’t need a backpack, a suitcase is more convenient. If you really need to carry something with you, a 25-40 liter bag is more than enough. Necessary supplies for Tibet travel: sunglasses, sun hat, sunscreen, skin cream, lip balm, long-sleeved top, Sweater; for special travel or travel to Ali, northern Tibet, and Sichuan-Tibet line, it is recommended to bring: sleeping bag (cold protection), sheets (dirty protection), down jacket, travel shoes or hiking shoes, slippers, toothbrush, toothpaste, towel, rolling paper , paper underwear, disinfectant wipes, flashlight, waterproof matches, knives, rope. Can a computer be carried in the front bag? Can a computer be carried in the front bag? Some backpacks have it.

How to convert a computer's 100M network port into a Gigabit network port. To upgrade a computer's 100M network port to a Gigabit network port, you generally need to follow the following steps: 1. Confirm whether the network card supports Gigabit network speed: First, you need to confirm that the computer Whether the network card supports Gigabit Ethernet, if not, it will not be possible to speed up the 100M network port to Gigabit. 2. Replace the network cable: To achieve Gigabit network speed, you need to use Cat5e or higher specification network cable, because Cat5e network cable can support Gigabit Ethernet, and for 100M Ethernet, you only need to use Cat5 network cable. 3. Change the network card driver: If your network card supports Gigabit Ethernet, you need to update the network card driver. You can go to the official website of the network card manufacturer to download and install the latest
