|
Yara Newbie
Joined: 24 Mar 2005 Posts: 1
|
Posted: Thu Mar 24, 2005 8:40 pm
%regex not case sensitive? |
Hey there,
how can I test, if a string starts with a capital letter? I tried to use %regex,
but that doesn't seem to be case sensitive,
%regex( "Test", [a-z])
and
%regex( "Test", [A-Z])
_both_ result in '1'. Same with %match.
Thanks for help |
|
|
|
Maelstrom Apprentice
Joined: 10 Feb 2005 Posts: 158
|
Posted: Thu Mar 24, 2005 9:01 pm |
#IF ("Test"=%proper("test")) {#ECHO Yup!}
|
|
|
|
Ins0mniak Apprentice
Joined: 27 Apr 2001 Posts: 110
|
Posted: Fri Mar 25, 2005 6:38 pm |
Maelstrom wrote: |
#IF ("Test"=%proper("test")) {#ECHO Yup!} |
That will probably take care of the situation above, but I'm actually in the situation of needing to test a unknown string to see if there is a capital letter in the middle of it. I don't understand why %regex isn't case sensitive...
Neither of these work correctly:
%regex(@SomeString,"[A-Z]\w+[A-Z]\w+")
OR
%regex(@SomeString,"[A-Z]\w+[^a-z]\w+")
:-( |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|