PHP makes HTML tags automatically complete closed function codes_PHP tutorial
WBOYOriginal
2016-07-21 15:15:30817browse
Briefly explain some codes: The first ~(<[^>]+?>)~si This regular expression matches the content in <…………>. Simply put, all . The second ~<([a-z0-9]+)[^/>]*?/>~si This regular expression matches the content in <……/>. It is a single closed tag such as
The third ~([a-z0-9]+)[^/>]*?>~si This regular expression matches . That is, the end tag such as the fourth ~<([a-z0-9]+)[^/>]*?>~si matches <... ...>. This is different from the first one. This one is a real html tag, because html tags only have numbers and letters, such as: The fifth one~~si No need to explain, HTMl comments The rest can be seen in the source code, PHP source code attachment:
http://www.bkjia.com/PHPjc/326092.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/326092.htmlTechArticleBrief explanation of some codes: The first ~([^]+?)~si This regular expression matches... Contents in . Simply put, all labels. The second ~([a-z0-9]+)[^/]*?/~si This regular expression matches...
Statement:
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