|
|
Browse by Tags
All Tags » bbCode
-
Hello
I have a forum that allows custom bulletin board code to be executed through PHP files. Now I'm trying to construct a html table tag from some kind of 'template'. A pipe symbol designates the delimiter between individual cells of the table and a linebreak designates that a new table row should be inserted. Ofcourse, there is no ...
-
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, ...
-
Hello All.
you know there are many forums using a quote bb code like this [q uote] some quote [/q uote]
I know how to match it but the problem is it can be nested and I do not know how to match it recursively.
some text [q uote] some quote [q uote] some nested quote [/q uote] some [q uote] some nested quote [/q uote] quote [/q uote] some ...
-
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 ...
-
Greetings.
I have some problems using a Regex replace for converting the following BBCode:
string bbCode = " [ color=red]Red[/color]";
Regex regExp = new Regex(@"\[ color=([^\]]+)\]([^\]]+)\[\/color\]");
string htmlCode = regExp.Replace(bbCode, "<span style=\'color: $1\'>$2</span>');
Essentially, ...
-
Hello! Please forgive in advance, my english is not too well. [:'(]. I am creating a content system in PHP. I want to make advanced "url" tags and I am at a loss.
I understand the basic {gopage=home disp=Home} but some of my urls will not always have just that. Some I need to have class and subpage. Is ...
-
Hi!
I need to write a regular expression code to replace only the outer occurance of a string with some other string say <aaaaaaaaaaaaaa>------ </aaaaaaaaaaaaaa>
Sample:
function sayHello($msg)
{
print $msg;
}
function bye()
...
-
I have a regexp who finds a blocks of bbCode.
#\\[(b|u|i|code|color|anothertag|anothertag2|etc)(\s=?.+?|=.+?|)] ( (?: (?R) | (?:.*?(?!\\\[/\\1])) )* ) \\[/\\1]#x
for example
[ b ]sfsf[ u ]sddgdg[ /u ]dfgdfg[ /b ]
It works on pcre 6.2 very well but if i run it on pcre 6.7(php 5.2) and use text like this
[ b ]sdfsdf[ i ]dgdfg[ /b ]dfgdg[ /i ...
|
|
|