MyBB Community Forums

Full Version: Help with mycode?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, I have mycode working for greentext

>it does this, makes it green if you start a sentence with >

It's like this:
Regex: (\n|^)>(.*?)(\n|$)\
Replacement: $1<span style="color: #27ae60;">&gt;$2</span>$3

I'd like to implement one more called orangetext. If you END your sentence with < it makes it orange

Like this<

Can anyone help me with the code? I tried but made a mess.
Which bit of code makes your text green if you use > ?
@iAndrew see this topic => Mycode for greentext?

@bluedagger
Quote:If you END your sentence with < it makes it orange
if you change it to < at the beginning of the text then that might be easy
same as suggested earlier - by using YourCode plugin & code set to multi-line mode
Regex: (\n|^)&lt;(.*?)(\n|$)\
Replacement: $1<span style="color: orange;">&lt;$2</span>$3
(12-15-2017, 03:31 AM).m. Wrote: [ -> ]@iAndrew see this topic => Mycode for greentext?

@bluedagger
Quote:If you END your sentence with < it makes it orange
if you change it to < at the beginning of the text then that might be easy
same as suggested earlier - by using YourCode plugin & code set to multi-line mode  
Regex: (\n|^)&lt;(.*?)(\n|$)\
Replacement: $1<span style="color: orange;">&lt;$2</span>$3

Yes, changing the > for < is easy, that's exactly why I was asking for help. I'd rather do it the way I said, with the < at the end of the sentence instead of at the beggining.