|
|
Browse by Tags
All Tags » HTML » bbCode
-
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, ...
-
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()
...
|
|
|