PHP uses regular expressions to write a UBB text editor
Let’s take a look at the UBB editor. This is a text processing technology often used on websites. Because I use the UBB file editor, the format I specified can exist. Users cannot display the format that I do not specify on the website.
Let’s take a look at the effect:
\1
', '\1
', '\1
', '\2
', '\2
', '', ); //使用正则匹配$string,将$string当中的值变为$replace的效果 $ubb=preg_replace($pattern,$replace,$string); echo $ubb; ?>
The implementation is more advanced. You can let the user pass the result in the form and let the user pass the value.
You convert the output to UBB format.
In the next chapter, we learn about the file system, and then we will explain to you something more interesting: the web page collector.