The following are three implementations to introduce the specified characters of variables in PHP regular substitution. Computer friends who need to learn can refer to them.
Three methods.
1.
The code is as follows | Copy code | ||||||||||||||||||||||||||||||||||||||||||||||||
?>
All three methods return the same result. The Perl style regular expression in PHP is exactly the same as Perl. Even the quotemeta is universal..
Some other examples of regular expressions Example:
//Match a position that is not followed by bar foobar123***abcbar
http: //www.bkjia.com/PHPjc/633093.html TechArticleThe following are three implementations to introduce the designated characters of variables in PHP regular substitution. For those who need to learn, Can be used for reference. Three methods. 1. The code is as follows Copy the code ?php $str = preg_qu...
Related labels:
source:php.cn
Previous article:A simple sorting of multidimensional arrays in PHP_PHP tutorial
Next article:Performance analysis of is_dir, is_file, file_exists functions in PHP_PHP tutorial
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
Latest Articles by Author
Latest Issues
Group MySQL results by ID for looping over
I have a table with flight data in mysql. I'm writing a php code that will group and displ...
From 2024-04-06 17:27:56
0
1
406
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
|