'How to match string and ignore the case in karate?

There is a case where one value sometimes is lower case and sometimes it's upper case. this is the response coming from an API and we have to match if every field in response is correct by ignoring some values. The error text in response sometimes has one keyword in lower and some scenarios it is upper case. How we can ignore one keyword in a string to not match? I don't want to ignore whole text as it works fine if I ignore whole string but is it possible to ignore one keyword only?

  Scenario: string matching
    * def test =
    """

    {
  "sourceType": "Error",
  "id": "123456",
  "type": "searchuser",
  "total": 0,
  "value": [
    {
      "details": "this is the user search case",
      "source": {
        "sourceType": "Error",
        "id": "77200203043",
        "issue": [
          {
            "severity": "high",
            "code": "678",
            "message": {
              "text": "No matching User details found"
            },
            "errorCode": "ERROR401"
          }
        ]
      },
      "user": {
        "status": "active"
      }
    }
  ]
}
    """
    * match test ==
    """
    {
  "sourceType": "Error",
  "id": "#present",
  "type": "searchuser",
  "total": 0,
  "value": [
    {
      "details": "#present",
      "source": {
        "sourceType": "Error",
        "id": "#ignore",
        "issue": [
          {
            "severity": "high",
            "code": "678",
            "message": {
              "text": "No matching User details found"
            },
            "errorCode": "ERROR401"
          }
        ]
      },
      "user": {
        "status": "active"
      }
    }
  ]
}
    """

How to ignore the case only for user here? I tried below but it treats #ignore as a value.

 "text": "No matching #ignore details found"


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source