MyBB Community Forums

Full Version: Do ">" without skipping a line.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
With this code: http://community.mybb.com/thread-90851-p...#pid663150
It's doing this:
>test
>test
>test
>test
>test
>test
>test
>test
Here's an example. Only every other line will turns green.

But I need a solution that will enable it to not skip a line and color each single line with the ">" . I was thinking of adding [br] (or something related) somewhere in the replacement text would do the trick.
\n>([^\n]*?)
<div style="color: #32CD32;">&gt;$1</div>
(2011-10-08, 09:38 PM)patrick Wrote: [ -> ]
\n&gt;([^\n]*?)
<div style="color: #32CD32;">&gt;$1</div>

No didn't work, http://mebes.net/Thread-Official-Test-Th...369#pid369
Anybody else, I really need this.
I see you've edited your earlier response. I guess you realized that it wasn't the best way to get help.
Here's the solution:
(?!\n)&gt;(.*?)(\n|$)
(2011-10-23, 09:28 PM)patrick Wrote: [ -> ]I see you've edited your earlier response. I guess you realized that it wasn't the best way to get help.
Here's the solution:
(?!\n)&gt;(.*?)(\n|$)

No, here's what that does:
testing>
one>
theeee>
keee>
lie>

See, http://mebes.net/Thread-Official-Test-Th...39#pid1239
you've messed up the replacement, because it's impossible to get that output because of the regex.
<div style="color: #32CD32;">&gt;$1</div>
Well then you should have specified that earlier.

Anyways, thanks a lot man, it worked Big Grin
[code]&gt;(.*?)(\n|$)[/cote]

try that for regular expression?