Search substring doenst work

I tested the substring search and it works. Example below:

Note that this search is case sensitive. Maybe that is the issue?

{
  "Name": "substring test",
  "CreationDate": "2025-8-12",
  "Commands": [
    {
      "Command": "store",
      "Target": "abc",
      "Value": "filename2",
      "Description": "this is the substring"
    },
    {
      "Command": "store",
      "Target": "helloabcdef123",
      "Value": "rptype",
      "Description": "this is the string to be searched"
    },
    {
      "Command": "if",
      "Target": "${rptype}.lastIndexOf(${filename2}) >-1",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Substring found!",
      "Value": "green",
      "Description": ""
    },
    {
      "Command": "else",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Substring NOT found!",
      "Value": "blue",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    }
  ]
}