Project 1999

Project 1999 (/forums/index.php)
-   Technical Discussion (/forums/forumdisplay.php?f=40)
-   -   Gina - excluding words as part of a search (/forums/showthread.php?t=298186)

abyssalstalker 05-16-2018 10:00 AM

Gina - excluding words as part of a search
 
Howdy,

I use Gina to notify me if people list certain items for auction so I can reach out to them. It works fantastic, but there's a feature I'd like to implement - how to exclude certain words from an item.

For example, I'd like Gina to notify me when someone is auctioning 'Black Marble' but not 'Crushed Black Marble' and 'Jaundice Gem' but not 'Crushed Jaundice Gem'

Below, I posted what I'm currently using. I've tried [^crushed] before the item but that doesn't seem to work. Any tips are appreciated!


^(?<seller>[A-Za-z]*) auctions, \'(?i:WTS|selling).*(?<item>(?i:Black Marble|Jaundice Gem|Flawed Sea Sapphire|Flawed Emerald|Flawless Diamond|Crushed Onyx Sapphire)).*\'

Morticon 05-16-2018 10:55 AM

Try something like:

Code:

(?<!Crushed\s)Jaundice Gem

abyssalstalker 05-18-2018 08:49 AM

Quote:

Originally Posted by Morticon (Post 2708244)
Try something like:

Code:

(?<!Crushed\s)Jaundice Gem

I believe this worked, thank you!

abyssalstalker 05-22-2018 05:40 PM

Howdy, I'm back again but this time trying to exclude certain sellers from my list. Here's what I'm using:

^(?<seller>[A-Za-z]*) auctions, \'(?i:WTS|selling).*(?<item>(?i:Crushed Topaz|(?<!Chipped\s)Black Marble)).*\'

I tried using the code Morticon provided at the beginning but it isn't seeming to work. Example:

(?<!NAME\s)^(?<seller>[A-Za-z]*) auctions, \'(?i:WTS|selling).*(?<item>(?i:item1|(?<!Chipped\ s)Onyx Sapphire)).*\'

I've also tried this below bit it seems to break the script

^((?<!name\s)?<seller>[A-Za-z]*) auctions, \'(?i:WTS|selling).*(?<item>(?i:item1|(?<!Chipped\ s)Onyx Sapphire)).*\'

Any help is appreciated, thanks!

Morticon 05-22-2018 06:12 PM

The following should allow you to exclude a list of names:

Code:

^(?!(?:Name1|Name2|Name3)(?!\w))(?<seller>[A-Za-z]*) auctions, \'(?i:WTS|selling).*(?<item>(?i:Crushed Topaz|(?<!Chipped\s)Black Marble)).*\'

abyssalstalker 05-22-2018 08:07 PM

Quote:

Originally Posted by Morticon (Post 2711937)
The following should allow you to exclude a list of names:

Code:

^(?!(?:Name1|Name2|Name3)(?!\w))(?<seller>[A-Za-z]*) auctions, \'(?i:WTS|selling).*(?<item>(?i:Crushed Topaz|(?<!Chipped\s)Black Marble)).*\'

You are quite wonderful. Works like a charm.

True talk, hit me up in EC on Deals and i'll be glad to tip you. This has helped me a lot and you deserve it.

Chapelle 08-02-2019 10:58 AM

I have something similar where I have an overlay that pops up the hit point number when I am hit by damage:

{S} ([A-Za-z]) YOU for {N}

or something like that - may be missing an asterisk or something.

When I am healed that number also shows up, which makes sense, but I'm looking for how to exclude the number I am healed by from showing up, so I preserve just damage from showing up on the overlay.

loramin 08-02-2019 11:00 AM

Just for any curious readers wondering what all this magic code is, it's called a "regular expression", and there are like a bajillion tutorials on how to write them yourself on the Internet, if you are interested.

Here's just one.

Quote:

Originally Posted by Chapelle (Post 2943066)
I have something similar where I have an overlay that pops up the hit point number when I am hit by damage:

{S} ([A-Za-z]) YOU for {N}

or something like that - may be missing an asterisk or something.

When I am healed that number also shows up, which makes sense, but I'm looking for how to exclude the number I am healed by from showing up, so I preserve just damage from showing up on the overlay.

I'm on Linux (so I don't have Gina), but when you want to include something in a regular expression, you put parentheses around it (like you did with "([A-Za-z])"). When you want to exclude it, you just add it the same way, but without parentheses.

So in theory to get rid of the healing number you just need to add it, but don't put parentheses around it. But I'm not sure how that "{S}" and "{N}" stuff works (that's Gina-specific). I think they might include invisible parentheses or something, and if that's the case you can't use "{N}" (but hopefully someone who knows Gina better can help more).

blue42 08-04-2019 06:41 AM

There's probably a more elegant way to do it, but this search text will work:

(?<!healed) you for {N}

https://i.imgur.com/EIf3NBQ.png


All times are GMT -4. The time now is 03:56 AM.

Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.