[ic] '!~' and 'rn' are not equivalent

Grant emailgrant at gmail.com
Wed Mar 10 20:44:30 UTC 2010


>>>> Since they have identical definitions under mv_column_op here:
>>>>
>>>>
>>>> http://www.icdevgroup.org/interchange-doc-5.2.0/frames/icdatabase_38.html
>>>>
>>>> I was under the impression that '!~' and 'rn' were equivalent
>>>> operators.  After some testing I see that they are not.  Can anyone
>>>> tell me what is the difference between them?
>>>
>>>
>>> Looks like the difference is that `rn` is case-sensitive, while '!~' is
>>> not.
>>
>> Not from what I'm seeing.  I get true from the following:
>>
>> [if type=explicit compare="'456 789' !~ '123'"]
>>       true
>> [else]
>>       false
>> [/else]
>> [/if]
>>
>> and false from the following:
>>
>> [if type=explicit compare="'456 789' rn '123'"]
>>       true
>> [else]
>>       false
>> [/else]
>> [/if]
>
>
> The "explicit" type of the [if] block expects perl code in the compare
> argument; the first is syntactically valid perl, the second is not (there's
> a "!~" operator, but no "rn"), and so fails (there may be a message in the
> logs about it, but I wouldn't be surprised if it was a silent failure).

Ah, very nice.  Thank you.

- Grant



More information about the interchange-users mailing list