Question

Which Tester operators are case sensitive?


Badge +7

At the excellent FME conference in London yesterday, I thought @1spatialdave said he used Contains in a Tester because it wasn't case sensitive. I've been doing @LowerCase(@Value(myAttr)) for some tests where I'm not confident of the case of the value I'm testing. So I'm interested to know which Operators are case sensitive and which are not. For example, if my value is "COMPLETED", I presume that myAttr = "completed" will not match. But will myAttr LIKE "completed" match?

It would be great not to have to worry about doing @LowerCase()...

If some operators are case sensitive and some aren't, please can we have this on the Tester help page. If it's already available, please it be linked to from the Tester helop page.

Depending on the answer to this, I'll vote on

https://knowledge.safe.com/idea/24357/case-sensitive-option-when-testing-attribute-value.html


21 replies

Userlevel 2
Badge +17

Let's test one by one!

The = operator works with case sensitive, in FME 2016 and 2017.

 

Next please :-)

Userlevel 4

Great idea making this a group effort, @takashi. I'm also looking forward to a contribution from @tim_wood ;-)

The "Like" operator is case INsensitive, in FME 2016 and 2017.

Next!

Badge +7

Ha ha! I kind of thought someone at Safe or one of the resellers would just know...

My contribution is that LIKE is not case sensitive (tested with attribute (Left) Values of "Completed", "COMPLETED" and "completed"; and Tester Right Values of "Completed", "COMPLETED" and "completed"). So that will do me for now.

It would still be good to have it in the Operators section of the Tester help page.

Userlevel 4

Ha ha! I kind of thought someone at Safe or one of the resellers would just know...

My contribution is that LIKE is not case sensitive (tested with attribute (Left) Values of "Completed", "COMPLETED" and "completed"; and Tester Right Values of "Completed", "COMPLETED" and "completed"). So that will do me for now.

It would still be good to have it in the Operators section of the Tester help page.

Hey, that's cheating, you did the same operator as I did ;-)
Badge +7

Great idea making this a group effort, @takashi. I'm also looking forward to a contribution from @tim_wood ;-)

The "Like" operator is case INsensitive, in FME 2016 and 2017.

Next!

Snap! Although I only tested in FME 2016.1.

 

@sander_s I think LIKE is the solution you want.
Badge +3

[regexp -nocase {regexp} {teststring}] = 1

and LIKE is indeed not cs.

Badge +7
Hey, that's cheating, you did the same operator as I did ;-)
Sorry - I posted before I received the email and hadn't refreshed the page either! As @1spatialdave said yesterday it's an average of 2 mins before a response here.

 

Technically my post wasn't identical to yours i.e. my post LIKE your post rather than my post = your post!

 

Userlevel 4
Sorry - I posted before I received the email and hadn't refreshed the page either! As @1spatialdave said yesterday it's an average of 2 mins before a response here.

 

Technically my post wasn't identical to yours i.e. my post LIKE your post rather than my post = your post!

 

Yes, you have to be quick around here!
Badge +7

Contains is not case sensitive.

Userlevel 2
Badge +12

It would be so nice if this information is included in the HELP for the transformer!!!!

Badge +7

It would be so nice if this information is included in the HELP for the transformer!!!!

I've emailed Safe

 

Badge
Snap! Although I only tested in FME 2016.1.

 

@sander_s I think LIKE is the solution you want.
Maybe, yes! Although I'd like to do some tests first. But thanks for the heads up :)

 

Badge +9

Thanks @erik_jan for the suggestion and everyone else in this thread for your dedication to finding the answers. I've filed a request for our doc team to take a look at adding this information. Your crowdsourcing will be a wonderful help.

 

 

I will let you know when the documentation has been updated.
Badge +7
Maybe, yes! Although I'd like to do some tests first. But thanks for the heads up :)

 

I guess it depends what sort of LIKE LIKE is like? Is it like T-SQL LIKE?

 

Badge
I guess it depends what sort of LIKE LIKE is like? Is it like T-SQL LIKE?

 

Wow, that's a lot of likes in one sentence! :)

 

But yes, my point exactly.
Badge

'In' is case sensitive in FME 2016 and 2017

Userlevel 2
Badge +17

'In' is case sensitive in FME 2016 and 2017

Yes, the In operator is case sensitive if the right operand is a comma separated values. However, interestingly, it is not case sensitive if the right operand is a range expression (min-max).

 

"String ranges (i.e. a-d) can also be specified." -- Help on the Tester

 

 

Case Sensitive

 

Left ValueOperatorRight ValueOutputbIna,b,cPassedBIna,b,cFailedbInA,B,CFailedBInA,B,CPassedCase Insensitive

 

Left ValueOperatorRight ValueOutputbIna-cPassedBIna-cPassedbInA-CPassedBInA-CPassed

 

Badge
Yes, the In operator is case sensitive if the right operand is a comma separated values. However, interestingly, it is not case sensitive if the right operand is a range expression (min-max).

 

"String ranges (i.e. a-d) can also be specified." -- Help on the Tester

 

 

Case Sensitive

 

Left ValueOperatorRight ValueOutputbIna,b,cPassedBIna,b,cFailedbInA,B,CFailedBInA,B,CPassedCase Insensitive

 

Left ValueOperatorRight ValueOutputbIna-cPassedBIna-cPassedbInA-CPassedBInA-CPassed

 

Well, that is confusing....

 

Userlevel 2
Badge +17

OK. I shall complete the work.

!= > < >= <= are all case sensitive.

Begins With and Ends With are case INsensitive.

Contains Regex (FME 2016.1+) and Matches Regex (FME 2016.0) are case sensitive, although the Regular Expression Editor for them works always with case INsensitive...

Badge +9

Hi All,

 

 

We have updated the documentation as of b17460. Thanks for all your help.

"The operators Like, Contains, Begins With, and Ends With are not case sensitive. The other operators are case sensitive."

 

 

Thanks!

 

Userlevel 2
Badge +17

Hi All,

 

 

We have updated the documentation as of b17460. Thanks for all your help.

"The operators Like, Contains, Begins With, and Ends With are not case sensitive. The other operators are case sensitive."

 

 

Thanks!

 

Hi @BrianAtSafe, thanks for the update on the help doc.

 

It would be better if the Regular Expression Editor for the Contains Regex opertor could work in case sensitive so that it would be consistent with case sensitivity of the operator.

 

Reply