On 3/23/11 1:58 PM, Ted Fines wrote:
Ideally I'd like a simple true/false I could get when I do a
case-insensitive substring match, some thing like:
[...]
Perl:
$plant = "Sunflower";
if ($plant =~ /FLOWER/i) {
... do something... ; the regex will match because of the 'i' after the /
}
Intermapper:
<snmp-device-variables>
SysLocation, 1.3.6.1.2.1.1.6.0, DEFAULT, "SysLocation"
<!-- $Syslocation could be "Room 505" or "LIBRARY BASEMENT" for example -->
InBasement, "$SysLocation" =~ "basement", CALCULATION
The current syntax is case-sensitive only. To simulate a
case-insensitive comparison, you'll need to use character classes:
InBasement, "$SysLocation" =~ "[bB][aA][sS][eE][mM][eE][nN][tT]",
CALCULATION
The resulting value ($InBasement) should be 1 if the expression matches.
--
Bill Fisher
Dartware, LLC
____________________________________________________________________
List archives:
http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [email protected]