bots with idents of -
1) 1letter4numbers
2) 4letters4numbers
are bothering us, anybody tellme this regex is correct to stop them?
.*![a-z][0-9][0-9][0-9][0-9].*@.*:.*
.*![a-z][a-z][a-z][a-z][0-9][0-9][0-9][0-9].*@.*:.*
Someone check my regex please
-
- Posts: 267
- Joined: Tue Jan 18, 2005 3:24 pm
- Location: Scotland - United Kingdom
Re: Someone check my regex please
well yes that would work..*![a-z][0-9][0-9][0-9][0-9].*@.*:.*
.*![a-z][a-z][a-z][a-z][0-9][0-9][0-9][0-9].*@.*:.*
But you probably would want to have fun with the repeat thingy, so:
Code: Select all
.*![a-z][0-9]{4}.*@.*:.*
Code: Select all
.*![a-z][0-9]{4}@.*:.*
Code: Select all
^.+![a-z][0-9]{4}@.+:.+
-
- Posts: 267
- Joined: Tue Jan 18, 2005 3:24 pm
- Location: Scotland - United Kingdom
ofc, i could be wrong... but should that be:aquanight wrote:Why use two regexes?
^.+![a-z]([a-z]{3})?[0-9]{4}@.+:.+$
^.+![a-z]([a-z]{4})?[0-9]{4}@.+:.+$
(1/4 letters, 1/4 numbers)
remembering that im just starting out with regexs
*edit* fixed bloody bbcode *edit*
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
-
- Posts: 267
- Joined: Tue Jan 18, 2005 3:24 pm
- Location: Scotland - United Kingdom
no becuz there is 1 [a-z] out of the sub expression,w00t wrote:ofc, i could be wrong... but should that be:aquanight wrote:Why use two regexes?
^.+![a-z]([a-z]{3})?[0-9]{4}@.+:.+$
^.+![a-z]([a-z]{4})?[0-9]{4}@.+:.+$
(1/4 letters, 1/4 numbers)
remembering that im just starting out with regexs
*edit* fixed bloody bbcode *edit*
ta muchley, im getting there
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]