Okay I relent, this is a much better approach. There are some indexing bugs in the parser I wrote using the trie search, but even if I resolved those it would never match items that are joined together without a space, which makes your approach so much more robust. I wish I had reached out to you when I was struggling to get the aho corasick modules to work before I went down the rabbit hole of a trie search by word.
2 Questions:
1) I think we can just replace your regex for WTS/WTB to include "buying" and "selling" too? As in...
2) Is there a way to keep track of the auction string that did not match any items/spells/aliases and return that separately from known items in the buying and selling arrays? As in...
If a user enters a watch for "jboots mq", it won't be a match from aho corasick. Ideally we could parse the unknown auction contents within the parser so that it gets cached along with the rest of the auction data, which would save an additional regex match on the auction content if the watch is not a "known" item.
Okay I relent, this is a much better approach. There are some indexing bugs in the parser I wrote using the trie search, but even if I resolved those it would never match items that are joined together without a space, which makes your approach so much more robust. I wish I had reached out to you when I was struggling to get the aho corasick modules to work before I went down the rabbit hole of a trie search by word.
2 Questions:
1) I think we can just replace your regex for WTS/WTB to include "buying" and "selling" too? As in...
2) Is there a way to keep track of the auction string that did not match any items/spells/aliases and return that separately from known items in the buying and selling arrays? As in...
If a user enters a watch for "jboots mq", it won't be a match from aho corasick. Ideally we could parse the unknown auction contents within the parser so that it gets cached along with the rest of the auction data, which would save an additional regex match on the auction content if the watch is not a "known" item.