Thanks for the reply, ah case sensitive lexicographical, makes sense then.
It was just a minor thing, I added a bunch of terms and wanted to check if I had all the variants.
The sorting of the watchlist did not make sense to me and was a bit difficult to see if all the variants I wanted were there.
Mainly stuff like: "BUY", "Buy" being after one another, but "buy" was way down the list, together with all terms starting with lowercase.
Bottom line is, could you easily change the sorting so it lists like this?
"BUY", "Buy", "buy", "SELL" instead of
"BUY", "Buy", "SELL", "buy"
If it requires work or you prefer it this way, no biggie.
It would probably be better to make the pattern matching case insensitive, since you're not the only person to want to use it like that. I don't remember the reason I made it case sensitive to begin with, beyond marginally simpler code. Oh, and that the fact you can match parts of words means that something like "ALG" would match "algae" (a false positive), but I think the usefulness of case-insensitive matching outweighs that.
I do not think you understand what I'm after. Unless there is some technical limitation I fail to see.
I want to change the odering of terms listed by f/watchlist command.
Not how you process the terms, when filtering the sidebar, for notifications to send.
I understood what you meant, but the only reason you came across this problem is that you have so many versions of the same watch term with different casing, right? In that case, it seems better to me to make it so matching is case insensitive, meaning that instead of all those duplicate entries in your watchlist you could just have "buy".
First of all, thanks for that great bot. it is very useful.
I have a little comment, please. The bot does recognize the triggering words even if it is a part of a word. For example, I have "NSE" as a triggering word so when someone types in the topic of a thread the word "License" then catches the word and sends the post to me.... which is not correct. So can you make it only catch the word if not a part of another word? thanks in advance.
Right, yes, this is the side-effect of making patterns case-insensitive that I hypothesised about above:
(06-16-2022, 12:14 AM)Biggles Wrote: It would probably be better to make the pattern matching case insensitive, since you're not the only person to want to use it like that. I don't remember the reason I made it case sensitive to begin with, beyond marginally simpler code. Oh, and that the fact you can match parts of words means that something like "ALG" would match "algae" (a false positive), but I think the usefulness of case-insensitive matching outweighs that.
The reason that it is beneficial to not match only whole words is that you would expect "To NSE: ..." or even something like "[NSE]" to get picked up. Note that there are no spaces between the watch term and punctuation in those titles. However it should be possible to change the programming to exclude matches for part of a word, while still allowing punctation around the term. I'll look at this later.
(06-27-2022, 07:15 PM)Biggles Wrote: Right, yes, this is the side-effect of making patterns case-insensitive that I hypothesised about above:
(06-16-2022, 12:14 AM)Biggles Wrote: It would probably be better to make the pattern matching case insensitive, since you're not the only person to want to use it like that. I don't remember the reason I made it case sensitive to begin with, beyond marginally simpler code. Oh, and that the fact you can match parts of words means that something like "ALG" would match "algae" (a false positive), but I think the usefulness of case-insensitive matching outweighs that.
The reason that it is beneficial to not match only whole words is that you would expect "To NSE: ..." or even something like "[NSE]" to get picked up. Note that there are no spaces between the watch term and punctuation in those titles. However it should be possible to change the programming to exclude matches for part of a word, while still allowing punctation around the term. I'll look at this later.
You could allow users putting in regex surrounded with slashes for those who need to get around that problem.
(06-27-2022, 07:15 PM)Biggles Wrote: However, it should be possible to change the programming to exclude matches for part of a word, while still allowing punctation around the term. I'll look at this later.
Appreciate it, dude - I think Corile idea is valid and can be a good fix, Good luck