Do ">" without skipping a line.
#1
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.
[Image: 76561198094087316.png]
Reply
#2
\n>([^\n]*?)
<div style="color: #32CD32;">&gt;$1</div>
Reply
#3
(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
[Image: 76561198094087316.png]
Reply
#4
Anybody else, I really need this.
[Image: 76561198094087316.png]
Reply
#5
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|$)
Reply
#6
(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
[Image: 76561198094087316.png]
Reply
#7
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>
Reply
#8
Well then you should have specified that earlier.

Anyways, thanks a lot man, it worked Big Grin
[Image: 76561198094087316.png]
Reply
#9
[code]&gt;(.*?)(\n|$)[/cote]

try that for regular expression?
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)