|
|
Browse by Tags
All Tags » preg_replace » bbCode
-
hi im using PHP and i got this function in my forumsoftware:
function links($text, $conf) {
$text = preg_replace("/(\s)http:\/\/([\S]+?)(\s)/i" , "$1http://$2$3" , " $text ");
$text = ...
-
I am working on making a bbcode system with php using preg_replace(), and I am making it so that other tags will not work inside of a code block. This is the code I am currently using, it almost works:
/(?!\[code\])(.*)(\[b\])(.+)(\[\/b\])(.*)(?<!\[\/code\])/Usi
what I want it to do is if [*code] and [*/code] are around the text inside, ...
-
Hi, I asking for help in my PHP code optimization. I try to rewrite my old/slow BBCode conversion function to use regex. The allowed BBCodes are
[ b]text[ /b]
[ i]text[ /i]
[ url]domain.com[ /url] or [ url]domain.com|domainname[ /url]
[ img]filename.ext[ /img] or [ img]filename.ext|description[ /img]
It is possible to construct ...
|
|
|