PDA

View Full Version : Advanced Watch List (Regular Expression ... tutorial?)


MadMikey
08-14-2003, 06:43 PM
I don't know how many really care, but I thought I'd share this with you and give you a couple of really simple examples.

When adding entries into your player watch lists, you can use *regular expressions*.....somewhat. If you don't know what regular expressions are, don't feel bad, I'm not too sure about them myself. :D

Regular expressions use pattern matching and symbols to determine if one thing matches another. It's a very cryptic system, that works extremely well, and extremely fast.

Here are some regular expression symbols that *should* work in the watch lists. As far as the watch list goes, normal watches are not case sensitive.

^ - matches at the beginning of the word (string really, but we'll use word here). For example, if I add 'ink' to my watchlist, any player with the i-n-k letter combination anywhere in their name would be a match. But if I add ^ink, only players that start with i-n-k, link Inkswitch or Inkstain, would be a match.

$ - matches at the end of a word. 'hort' would match Hort, -=UP:Hort, HortonsWho and Short, while 'hort$' would only match Hort and -=UP:Hort.

. = matches any single character. 's.orty' would match Shorty and Sporty. Get it?

If you want a more exact match on a player name, you can combine them, like this, '^hort$'. This would only match Hort, not Shorty or -=UP:Hort.

| - Stands for OR. Used to match one expression *OR* another. This is one regular expression symbol that I know for sure cannot be used in the GA Watch List. All pipe characters, |, will be converted to the . character. You can still use them, like adding |umh|, to find all of the UMH clan members. It just acts differently than in standard regular expressions.

The reason I brought this up, is because I had 'hort' in my Watch List, and this guy Shorty kept showing up as being online, and I didn't really care.

Play
08-14-2003, 06:50 PM
Sweet! Yeah, it helps.

SoBeiT
08-14-2003, 10:18 PM
Good explaination Mikey.

I got it :)