There are several existing libraries for parsing BBCode, it may be easier to look into those than trying to roll your own:
Here’s a couple, I’m sure there are more if you look around:
PECL bbcode
PEAR HTML_BBCodeParser
More Related Contents:
- Where 2 != 2 in PHP
- How to store repeating dates keeping in mind Daylight Savings Time
- “[notice] child pid XXXX exit signal Segmentation fault (11)” in apache error.log [closed]
- Php-intl installation on XAMPP
- How to output custom HTTP body contents with CakePHP 3.4? Echoing causes “Unable to emit headers” error
- PHP Fatal error: Class ‘PDO’ not found
- CakePHP find method with JOIN
- CakePHP 2.0 – How to make custom error pages?
- How to use multiple databases dynamically for one model in CakePHP
- Request Entity Too Large PHP
- SQLSTATE[HY000] [1045] Access denied for user ‘username’@’localhost’ using CakePHP
- Set Response Status Code [duplicate]
- CakePHP does not use my models
- .htaccess for cakephp
- How to “Validate” Human Names in CakePHP?
- Cakephp-3.x: How to change the data type of a selected alias?
- How to convert HTML to BBCode
- How do you make strings “XML safe”?
- CakePHP remember me with Auth
- CakePHP Xml utility library triggers DOMDocument warning
- php regex [b] to
- Undefined variable: $_SESSION
- Encryption/Decryption of Form Fields in CakePHP 3
- CakePHP Database connection “Mysql” is missing, or could not be created
- To Use a PHP Framework or Not? [closed]
- Cron Dispatcher CakePHP 2.0
- Best way to document Array options in PHPDoc?
- How to eliminate php5 Strict standards errors?
- UNION syntax in Cakephp
- CakePHP switch database (using same datasource) on the fly?