Results 1 to 5 of 5

Thread: Reg Ex match?

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    70

    Reg Ex match?

    If I wanted to match a combination that was

    Gibartik
    Gibentik
    Gonar
    Jonar

    Would it be:

    Name:[GJ](ib|on)(ar|en)(tik)+

    ?

  2. #2
    Registered User Mr. Suspicious's Avatar
    Join Date
    May 2002
    Posts
    667
    I'd say:

    Name:.*[GJ][io][bn][ae][rn]*

    the first .* isn't realy needed, but I made it a custom to always use it anyway.
    Before asking anything read the pre-face section of http://www.smoothwall.org/download/p....9/doc.faq.pdf

    after you've read it, you know what to do next...




    "Stay alert! Trust noone! Keep your Lazers Handy! Have a nice day." -- Provided courtesy of the Computer. The Computer never lies.

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    70
    Part of the problem is that pet names match a string.

    First char is:
    G,J,K,L,X,Z

    Then there is a patern:

    ab,an,ar,en,er,ib, etc

    That cna be repeated up to 3 times.

    Then there may or may not be a "tik" on the end.
    In perl I'm searching with:

    (G|J|K|L|V|X|Z)(ab|an|ar|as|eb|ek|en|er|ib|ob|on)+ (tik|n)*

  4. #4
    Registered User Mr. Suspicious's Avatar
    Join Date
    May 2002
    Posts
    667
    Ah, I understand. You're trying to identify pets.


    Wouldn't it be more easy to filter on a few things to identify a pet?

    Name, Race, Class, Level perhaps?

    Name:.*[GJKLXZ][aeio]*;9-11:Race:Skeleton:Class:Warrior

    for the level 12 Necromancer Pet for instance (http://eq.castersrealm.com/spells/spell.asp?Id=396), chances that there's a named spawn Skeleton with a name starting with G, J, K, L, X or Z + a second character a, e, i or o and in that level range is very small, if not non existant.

    Cnf: /usr/local/share/showeq/filters.conf.dist
    Before asking anything read the pre-face section of http://www.smoothwall.org/download/p....9/doc.faq.pdf

    after you've read it, you know what to do next...




    "Stay alert! Trust noone! Keep your Lazers Handy! Have a nice day." -- Provided courtesy of the Computer. The Computer never lies.

  5. #5
    Registered User
    Join Date
    Apr 2002
    Posts
    70
    Then you have to have the same line for each possible combination of pet race and class. That's 16 searches for just mage pets. I think I have it with:

    next if ( $_ =~ /^.:[G|J|K|L|V|X|Z][ab|an|ar|as|eb|ek|en|er|ib|ob|on]+[tik|n]*/ );

    that just leaves out a few which are caught with:

    next if ( $_ =~ /^.:[G|J|K|L|V|X|Z]tik/ );

    Now I need to know how to filter out corrupted data. 2 different spawnlogs I've gotten have alot of ctrl characters in them.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is On
vB code is On
Smilies are On
[IMG] code is On