Topic awaiting preservation: REGEXP |
|
---|---|
Author | Thread |
Maniac (V) Inmate From: Florida |
posted 07-28-2003 15:04
Is there any reason why $privateforum IS also matching 5? |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 07-28-2003 15:21
... and this was *what* to do with regular expressions? |
Maniac (V) Inmate From: Florida |
posted 07-28-2003 15:33
Again - The idea is ONLY to block the numbers within $privateforum. (MySQL uses Henry Spencer's implementation of regular expressions, which is aimed at conformance with POSIX 1003.2. MySQL uses the extended version.) |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 07-28-2003 15:41
Kriek: There isn't need for a regular expression here. I use something similar to this: quote:
|
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 07-28-2003 17:27
not to mention that regexps searches kill mysql performance faster than you can say 'argh'. |
Maniac (V) Inmate From: Florida |
posted 07-28-2003 18:33
Emp, Thank you - I really appreciate it =) |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 07-28-2003 18:50
Kriek: No worries. Its a message mr.maX repeats but as with regular expression in general there are often more efficient ways of doing things. |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 07-28-2003 22:14
Hey! some of us love Regular Expressions! |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 07-28-2003 23:22
To answer the question as to why 5 was getting matched as well as 4,6,7,8,9,0 should also get matched is that the square brackets create a character set so: code: [24] |
Maniac (V) Inmate From: Florida |
posted 07-29-2003 00:51
Bit, that absolutely makes sense - thank you! |