note 102779 added to function.bbcode-create

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
It should be noted that rothenbergxxx at gmail dot com's regex will only work for single line $innertext. While this is perfectly fine for the majority of the tags, quote tags need multi-line $innertext.

Here is a fixed version of the regex which supports multi-line $innertext between the opening and closing tags:

preg_match_all('`\[(.+?)=?(.*?)\]([\s\S]+?)\[/\1\]`', $string, $matches)

In my tests, this performs without error. Feel free to post any additional corrections.
----
Server IP: 69.147.83.197
Probable Submitter: 121.218.196.174
----
Manual Page -- http://www.php.net/manual/en/function.bbcode-create.php
Edit        -- https://master.php.net/note/edit/102779
Del: integrated  -- https://master.php.net/note/delete/102779/integrated
Del: useless     -- https://master.php.net/note/delete/102779/useless
Del: bad code    -- https://master.php.net/note/delete/102779/bad+code
Del: spam        -- https://master.php.net/note/delete/102779/spam
Del: non-english -- https://master.php.net/note/delete/102779/non-english
Del: in docs     -- https://master.php.net/note/delete/102779/in+docs
Del: other reasons-- https://master.php.net/note/delete/102779
Reject      -- https://master.php.net/note/reject/102779
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.