Right now, the maximum SAX highlight regex is 32 characters. This is tiny. For comparison, my username is 15 characters long. There's really no reason that it should be this small. I feel like a 1 KB limit would be more reasonable. Maybe even larger, so that we can match every possible misspelling of our username or something.
- ProgrammerBobSmith
- Member (Posts: 114)
- Re: Increase maximum highlight regex length
- 18 Aug 2022 08:12:47 pm
commandblockguy wrote:
Right now, the maximum SAX highlight regex is 32 characters. This is tiny. For comparison, my username is 15 characters long. There's really no reason that it should be this small. I feel like a 1 KB limit would be more reasonable. Maybe even larger, so that we can match every possible misspelling of our username or something.
Well, first of all who has a username that is 1KB in size? Either way it can only help and won't do any hurt, so I would definitely say sure!
Nobody has a username 1KB in size, but some people might want to implement more complex logic in their highlight detection. For example, most people don't want to get highlighted by their own Discord messages, and you might want to add other phrases that pertain to you that aren't your username. In my IRC client, I have most of my projects' names set as highlight phrases, as well as variants of my username and real name, several Minecraft mods I have strong feelings about, several geographical locations that are near me, and other topics that I'd like to be made aware of whenever they're being discussed.
commandblockguy wrote:
Nobody has a username 1KB in size, but some people might want to implement more complex logic in their highlight detection. For example, most people don't want to get highlighted by their own Discord messages, and you might want to add other phrases that pertain to you that aren't your username. In my IRC client, I have most of my projects' names set as highlight phrases, as well as variants of my username and real name, several Minecraft mods I have strong feelings about, several geographical locations that are near me, and other topics that I'd like to be made aware of whenever they're being discussed.
Oh wow, I didn't even know that most of this was possible! But I definitely like being notified in this manner, so yes please change the highlight max to 1KB!
[edit] To create custom highlights do I use the notification highlight pattern in the 'Edit Profile'? and do I separate the words with commas?
It's a regular expression.
You can try them out at a site like https://regexr.com/.
If you just want multiple words to highlight you, you can do something like Bob Smith|BobSmith|PBS|monTIrey. There are also a lot of other advanced features of regex that you can try out on that site.
You can try them out at a site like https://regexr.com/.
If you just want multiple words to highlight you, you can do something like Bob Smith|BobSmith|PBS|monTIrey. There are also a lot of other advanced features of regex that you can try out on that site.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement