mIRC Home    About    Download    Register    News    Help

Print Thread
help $regex #206620 18/11/08 09:40 PM
Joined: Mar 2008
Posts: 47
N
nok Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2008
Posts: 47
Trouble...
Code:
$regex(,/^()$/Si) 1
$regex(,/^()$/Si) 0

It would be a solution ...?
Code:
$regex($lower(),/^( $+ $lower() $+ )$/Si)

Last edited by nok; 18/11/08 10:39 PM.
Re: help $regex [Re: nok] #206630 19/11/08 03:47 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
What exactly are you trying to do?

Re: help $regex [Re: Tomao] #206632 19/11/08 08:35 AM
Joined: Mar 2008
Posts: 47
N
nok Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2008
Posts: 47
It's a bot trivia, I'm trying to read the answers

Re: help $regex [Re: nok] #206641 19/11/08 03:00 PM
Joined: Dec 2002
Posts: 2,022
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,022

[08:59] * RoCk smells a trivia cheat script

Re: help $regex [Re: nok] #206644 19/11/08 04:52 PM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Quote:

9. Case-insensitive matching applies only to characters whose values
are less than 128, unless PCRE is built with Unicode property support.
Even when Unicode property support is available, PCRE still uses its
own character tables when checking the case of low-valued characters,
so as not to degrade performance. The Unicode property information is
used only for characters with higher values. Even when Unicode property
support is available, PCRE supports case-insensitive matching only when
there is a one-to-one mapping between a letter's cases. There are a
small number of many-to-one mappings in Unicode; these are not sup-
ported by PCRE.


I suspect Khaleds compiles PCRE with --enable-utf8 and not with --enable-unicode-properties. The latter includes a 30k mapping of lower and uppercasing in UTF-8. Should add a bug/feature request when i get home.


$maybe