Regex for random numbers

These are old archives. They are kept for historic purposes only.
Post Reply
chevyman2002
Posts: 62
Joined: Sun Nov 14, 2004 2:55 am
Location: Texas
Contact:

Regex for random numbers

Post by chevyman2002 »

I can't figure out the regex for the following example: test is 36232620@Summit-435BBDBB. There are countless proxies being used (all, of course, undetected by BOPM) that are quite annoying and I'd like to ban. Thus far, they are all using 8 numbers for the ident but the nickname and host are always different. The last thing i tried was (.+)![0-9+]@[^:]+:\1$ but i have no idea what i'm doing.. Any suggestions??
Your face looks like it was set on fire and put out with an axe ;x.
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Re: Regex for random numbers

Post by Jobe »

chevyman2002 wrote:I can't figure out the regex for the following example: test is 36232620@Summit-435BBDBB. There are countless proxies being used (all, of course, undetected by BOPM) that are quite annoying and I'd like to ban. Thus far, they are all using 8 numbers for the ident but the nickname and host are always different. The last thing i tried was (.+)![0-9+]@[^:]+:\1$ but i have no idea what i'm doing.. Any suggestions??
You got the + in the wrong place, [0-9+] is any number between 0 and 9, or a + character. [0-9]+ is 1 or more numbers, [0-9]{8} is exactly 8 numbers, [0-9]{8,} is 8 or more and [0-9]{,8} is 0-8 numbers. :P
Your IP: Image
Your Country: Image
chevyman2002
Posts: 62
Joined: Sun Nov 14, 2004 2:55 am
Location: Texas
Contact:

Re: Regex for random numbers

Post by chevyman2002 »

Jobe1986 wrote:
chevyman2002 wrote:I can't figure out the regex for the following example: test is 36232620@Summit-435BBDBB. There are countless proxies being used (all, of course, undetected by BOPM) that are quite annoying and I'd like to ban. Thus far, they are all using 8 numbers for the ident but the nickname and host are always different. The last thing i tried was (.+)![0-9+]@[^:]+:\1$ but i have no idea what i'm doing.. Any suggestions??
You got the + in the wrong place, [0-9+] is any number between 0 and 9, or a + character. [0-9]+ is 1 or more numbers, [0-9]{8} is exactly 8 numbers, [0-9]{8,} is 8 or more and [0-9]{,8} is 0-8 numbers. :P
Thanks a lot! That helps out a great deal in understanding how regex and Unreal work.. I ended up having to use "(.+)![0-9]{8,}@(.+)$" without quotes, of course, to successfully ban the annoyances.. I'm sure I will have to come up with something else soon.. Thanks again! :D
Your face looks like it was set on fire and put out with an axe ;x.
Post Reply