MyBB Community Forums

Full Version: Trying to make my first MyCode. Need some help.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm working on a MyCode for VB.NET syntax highlighting and I can't seem to just get the basics down. This is my current regular expression:
\[vb\](\'.*$)|("[^"\r\n]*")\[/vb\]

This is my current HTML:
<span style="color: blue;">$0</span>
<span style="color: red;">$1</span>

That outputs:
[vb]'test "test"[/vb] 'test "test"[/vb]

I tried changing the HTML:
<span style="color: blue;">$1</span>
<span style="color: red;">$2</span>

That outputs:
'test "test"[/vb]

...and so on.

I can't seem to figure out what I'm doing wrong. Any help would be appreciated, thanks a lot!
I've fixed this error now I need some help on how to make newlines actually appear if you input them in between the tags.

Example:
If i input:
[test]
test
test1
[/test]


It would output: test test1

How do I make it output:
test
test1


Thanks for any help!
Try adding a <br /> to the end of the <span> tags.
(2012-04-23, 03:23 AM)Jordan L. Wrote: [ -> ]Try adding a <br /> to the end of the <span> tags.

If the color of some text isn't changed though that wouldn't work. Undecided