Frequently used main/alt patterns

Scans for, and displays main/alt relations in your Guild

Moderator: PleegWat

Frequently used main/alt patterns

Postby PleegWat » Fri Jul 07, 2006 2:38 pm

The following regex patterns are freqently enough used to have been on the previous wiki page:

Identification string in front of the main name:
Code: Select all
/ALT-([\w]+)/i

For example ALT-Pleegwat

Identification string after the main name:
Code: Select all
/([\w]+)s Alt/i

For example, Pleegwats Alt

First word in the note
Code: Select all
/([\w]+)/i

For example, (Pleegwat)

Multiple identifiers, for example seperate identifiers for alts and twinks, but have both as alts:
Code: Select all
/(Alt-|Twink-)([\w]+)/i

For example, both Alt-Pleegwat and Twink-Pleegwat would be denoted my alts in this setup.
Note on this one: since the nick is in the second bracketed expression you'll need to set the use match setting to 2.


On all of these example patterns remove the i at the end for case sensitive matching of the identifying string.


The field to apply on is usually the public note or officer's note.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Frequently used main/alt patterns

Postby MattM » Fri Jul 07, 2006 6:09 pm

PleegWat wrote:Identification string after the main name:
Code: Select all
/([\w]+)s Alt/i

For example, Pleegwats Alt


is "Alt" case insensitive in that regex? some people have it as xxxxxx's ALT

or xxxxxx's alt

what about apostrophe? some people have xxxxxx's some people have xxxxxx some people have xxxxxxs
Last edited by MattM on Fri Jul 07, 2006 6:11 pm, edited 2 times in total.
MattM
UA/UU Developer
UA/UU Developer
Gimpy Developer
Gimpy Developer
 
Posts: 886
Joined: Tue Jul 04, 2006 9:53 pm
Location: USA

Re: Frequently used main/alt patterns

Postby PleegWat » Fri Jul 07, 2006 8:53 pm

With the i at the end (after the second /) it is case-insensitive, so it'll match ALT or alt too.

I didn't add the apostrophe to keep stuff simple, if you want to match with or without one use this:

Code: Select all
/([\w]+)'?s Alt/i


The ? means the preceding character (the apostrophe) may occur zero or one times.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Frequently used main/alt patterns

Postby Grimicus » Sat Jul 08, 2006 7:22 am

I'm using /^Alt:\s*(\w+)/i

this means that the first part of the note should be Alt:<space type characters (maybe :-))><character's name>

That way they can do whatever they want after it :-)
Last edited by Grimicus on Sat Jul 08, 2006 7:25 am, edited 2 times in total.
Grimicus
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Wed Jul 05, 2006 6:06 am

Frequently used main/alt patterns

Postby Adariel » Mon Aug 07, 2006 5:00 am

We just have the main's name in the public note and "Main" in the Main's public note.

I also tweaked the primary menu to look for the Main instead of the Alt so that I don't have to recode my entire roster in game.
User avatar
Adariel
WR.net Apprentice
WR.net Apprentice
 
Posts: 36
Joined: Tue Jul 25, 2006 9:14 am


Return to AltMonitor

Who is online

Users browsing this forum: No registered users and 1 guest

cron