AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   is there a switch to turn on case ignore in amx regx (https://forums.alliedmods.net/showthread.php?t=24853)

[DumB]Steamsucks 03-03-2006 16:46

is there a switch to turn on case ignore in amx regx
 
looking to turn off case sensative so

+dick+ will match DICKHEAD or dickhead please

regards ...

Des12 03-03-2006 17:04

equali = case sensative
equal = not case sensative

[ --<-@ ] Black Rose 03-03-2006 17:09

wouldn't it be the oposite?

Greenberet 03-03-2006 17:13

Quote:

Originally Posted by Des12
equali = case sensative
equal = not case sensative

that has nothing to do with regex...

try this:
Code:
"(?i)+dick+"

Belsebub 03-03-2006 17:16

Quote:

Originally Posted by Des12
equali = case sensative
equal = not case sensative
Quote:

Originally Posted by [ --<-@
Black Rose]wouldn't it be the oposite?


yep

Hawk552 03-03-2006 17:17

Quote:

Originally Posted by [ --<-@
Black Rose]wouldn't it be the oposite?

Yes.

Quote:

Originally Posted by Des12
equali = case sensative
equal = not incase sensative

You're both wrong, and also off topic. It would be the other way around.

Kraugh 03-03-2006 17:20

clarifying the original question: the user wishes to ignore case sensitivity when matching expressions with the regex module, not with comparing strings using equal/contain. this is also not a post about grammar or spelling.

greenberet is correct. (?i) forces all characters to the right to be case insensitive. conversely, (?-i) forces case sensitivity. the rest of you, go away. ;)

[DumB]Steamsucks 03-03-2006 17:21

Quote:

Originally Posted by Greenberet
Quote:

Originally Posted by Des12
equali = case sensative
equal = not case sensative

that has nothing to do with regex...

try this:
Code:
"(?i)+dick+"

thanks at the moment i am useing
Code:
strtolower(input)

wich appears to work ok but i will try the ?i as well
thanks...


All times are GMT -4. The time now is 20:22.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.