Page 1 of 1
Regex for random numbers
Posted: Fri Oct 02, 2009 3:47 am
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??
Re: Regex for random numbers
Posted: Fri Oct 02, 2009 7:56 am
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.

Re: Regex for random numbers
Posted: Sat Oct 03, 2009 3:21 am
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.

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!
