veiset / poe-vendor-string

Path of Exile Vendor Search tool
59 stars 16 forks source link

Shorter Vendor Searches #166

Closed Miku0Sama closed 1 week ago

Miku0Sama commented 2 weeks ago

When looking for RGB sockets (for reselling for chromatics) you can use :.*(?=\S*r)(?=\S*g)(?=\S*b) instead as it uses fewer characters than what is currently given. (27 characters vs current 38) AFAIK there is never a situation where an item will have the letters r, g, and b in a single word that is preceded by a colon in the same line. If there is you can always add ts at the start to guarantee that it will only check the sockets line of the item description which is still a fair bit shorter.

Additionally, when searching for x number of sockets (ignoring links) you can use (\w\W){#} where # is the number of sockets you want minus 1. This would only change the "Any 6 Sockets" option on the site for now.

Shortening these is nice since it allows you to find any reselling items with a single search rather than 2. Gotta farm those chromatics, jewellers and fusing orbs amirite?

Here is a picture from https://regexr.com showing a handful of tests for the RGB search with each being correctly identified. (And yes, I did test a few items in game as well and they worked as expected) image

veiset commented 2 weeks ago

That's amazing. Can you do some testing ingame too? The Path of Exile regex engine has a lot of quirks, but I think this should work.

If you can do just a quick test ingame for both cases I'll update the webpage, thanks!

Miku0Sama commented 2 weeks ago

I'm actually relatively new to the game so the items I have available to me are rather limited lol, but here are a couple screenshots of each one being tested with what I had available.

No Search ![image](https://github.com/user-attachments/assets/69c70de5-98a9-4876-b912-56f6b5d56142)
At least 5 sockets ![image](https://github.com/user-attachments/assets/896fa51c-3212-4014-aecf-b80a61a706ba)
At least 4 sockets ![image](https://github.com/user-attachments/assets/a37f8658-eaec-4da8-a837-6738c8a8d005)
Linked RGB ![image](https://github.com/user-attachments/assets/5f3d721c-3e40-4ea2-93cf-c39236ab623e)

For reference though, I have figured out a couple of the quirks PoE has. First, it uses JavaScript based RegEx. Second, it innately has the "case insensitive" and "multiline" flags enabled (meaning searches check each line of an item description independently). Finally, whatever code is used to parse the text in the search box ignores whitespace at the beginning and end of the search regardless of quotations. So searching "ABC" is functionally identical to searching " ABC " both with and without quotes.

veiset commented 1 week ago

Hey, this should be implemented now. Let me know if it isnt working correctly. Thanks for the suggestion.