ID 402926 - VariableSwitch node does not support patterns with the '-' character

Follow

Problem summary
The VariableSwitch node does not support patterns with the '-' character and will not switch to the input.

The following error is printed in the console:
Unrecognized character: - ASCII code(45)

Customer reported version
katana.3.0v9

Customer reported platform
centos7

Steps to reproduce
  1. Define new global variable in the Project Settings tab.
  2. Create VariableSwitch node with two inputs.
  3. Connect different PrimitiveCreates nodes to each input.
  4. Set the VariableSwitch patterns.i1 parameter to 'value-1'.
  5. Set the global variable value to 'value-1'.

Notice: The scene graph will be set to patterns.i0 and an error is printed to the console.


Actual behavior 
VariableSwitch doesn't switch if variable value contain '-' symbol.

Expected behavior 
VariableSwitch switches regardless of special symbols in variable value.

Workaround
Replace the '-' in the VariableSwitch with a '?' (any character).

Reproduced by support
This bug has been reproduced in:
Katana 3.1v5 - CentOS 7, Windows 10
Katana 3.1v1 - CentOS 7, Windows 10 
Katana 3.0v9 - CentOS 7, Windows 10
Katana 3.0v1 - CentOS 7, Windows 10
Katana 2.6v1 - CentOS 7, Windows 10
Katana 2.5v1 - CentOS 7, Windows 10
Katana 2.1v1 - CentOS 7
Katana 2.0v1 - CentOS 7 

Earliest version tested
Katana 2.0v1 - VariableSwitch node did not exist before this version


    We're sorry to hear that

    Please tell us why