Enforcer
01-14-2003, 09:00 AM
I got a mail like this:
>Also Could you email me an example of regular Exp To exclude clan members I was trying the following Clan member1¦Clan member2¦Clanmember3
I was thinking of bring that informations to all users. So you have some examples how Regular Expressions work and should get an idea of how building new filters. 8)
IF you want to Welcome Clan Members you @first have to make sure there are in the Clan so the Clan Tag should be in front:
RegExp: ^\[M\.K\.F\]
That will only match our clan tag.
The ^ will ensure it only matches the first letters of a string so oyu dont can have the tag somewhere else if the expression should match.
You need a \ before every special char that is uses by the RegExp with an other meaning. You will find this in the Website im linking to in my Read me.
Some chars like: . [ ] ( ) ^ $ { } * |
New wee need to match some players
Player1 : player1
player2: playe.r2
player3: player.|^3
crazy names but just an example.
if you want to match several strings you need the |
if you want to match a hole word the best is to take it in brackets
(word)
so here the regexpr is:
RegExp: ((player1)|(playe\.r2)|(player\.\|\^3))
hehe i hope you get this now :D
And here is the full string if you’re players all using "Clanname Nick" the " " is imported.
RegExp: ^\[M\.K\.F\] ((player1)|(playe\.r2)|(player\.\|\^3))$
The $ at the end will ensure that the string end at this point.
Here some other examples:
if some players also using "ClannameNick" you may want to do this optionally.
^\[M\.K\.F\] {0,1}((player1)|(playe\.r2)|(player\.\|\^3))$
if you also want to match it on Trail members and there have an optional (TM) like
"Clanname(TM) Nick" it would be like:
^\[M\.K\.F\](\(TM\)){0,1} {0,1}((player1)|(playe\.r2)|(player\.\|\^3))$
You can make a test of that all with the extra menu - test Regular Expression.
Have Fun ;)
Enforcer
>Also Could you email me an example of regular Exp To exclude clan members I was trying the following Clan member1¦Clan member2¦Clanmember3
I was thinking of bring that informations to all users. So you have some examples how Regular Expressions work and should get an idea of how building new filters. 8)
IF you want to Welcome Clan Members you @first have to make sure there are in the Clan so the Clan Tag should be in front:
RegExp: ^\[M\.K\.F\]
That will only match our clan tag.
The ^ will ensure it only matches the first letters of a string so oyu dont can have the tag somewhere else if the expression should match.
You need a \ before every special char that is uses by the RegExp with an other meaning. You will find this in the Website im linking to in my Read me.
Some chars like: . [ ] ( ) ^ $ { } * |
New wee need to match some players
Player1 : player1
player2: playe.r2
player3: player.|^3
crazy names but just an example.
if you want to match several strings you need the |
if you want to match a hole word the best is to take it in brackets
(word)
so here the regexpr is:
RegExp: ((player1)|(playe\.r2)|(player\.\|\^3))
hehe i hope you get this now :D
And here is the full string if you’re players all using "Clanname Nick" the " " is imported.
RegExp: ^\[M\.K\.F\] ((player1)|(playe\.r2)|(player\.\|\^3))$
The $ at the end will ensure that the string end at this point.
Here some other examples:
if some players also using "ClannameNick" you may want to do this optionally.
^\[M\.K\.F\] {0,1}((player1)|(playe\.r2)|(player\.\|\^3))$
if you also want to match it on Trail members and there have an optional (TM) like
"Clanname(TM) Nick" it would be like:
^\[M\.K\.F\](\(TM\)){0,1} {0,1}((player1)|(playe\.r2)|(player\.\|\^3))$
You can make a test of that all with the extra menu - test Regular Expression.
Have Fun ;)
Enforcer