quote:
Originally posted by Shondoit
So? They are replaced now... to replace it for gradients, would mean alot of ·$n codes, wich will boost your text length with umm, at least 300%
Unpractical
If he wants it, I could have a look at it
That's not the point. I didn't say you need to simulate a gradient with irc codes (it would be cool though).
The request was to replace bbcode color codes, so they don't exist anymore in the string. This means if a gradient is done, that code should be replaced too (with whatever) and not be left in because "irc codes don't support gradients".
This is the same if you have a file saved in Word and you want to convert it to a textfile. You don't want to keep all the "not supporting" codes in it, they should be replaced too (with nothing; aka removed).
PS: as said, if hexadecimal color codes are used, Plus! will interpret the first 6 characters, but anything after that is ignored (as long as the string doesn't exceep 53 characters). So add ".{0,53}?" after each "[0-9A-Fa-f]{6}" (but they shouldn't be captured of course).
quote:
Originally posted by Shondoit
(btw, I saw the text you now edited out, please tell what didn't work, for learning purpose)
I removed it because a) I thought I was wrong in saying that, b) nobody replied yet.
but as a matter of fact, I wasn't wrong
1) "[1-6]?\d" should actually be "[0-9]{1,2}" or "\d{1,2}". Numbers from 0 to 99 are allowed.
2) the irc codes should contain 2 digits, not 1. 1 digit is possible to use, but may conflict with the actual string you try to color if it begins with a number. Same for backgrounds.
EDIT: blah... what SpunkyLoveMuff said below, while I was editing this
EDIT2: ".{0,53}" should be ".{0,53}?"