I am using spring integration in my project. I need to verify if one of the nodes value in my response contains a string by ignoring case sensitivity.
I have to see if the databaseName
value contains DB2
by ignoring case sensitivity.
I am using the following expression to verify, but it's not working.
expression="T(java.util.regex.Pattern).compile(T(java.util.regex.Pattern).quote('DB2'), T(java.util.regex.Pattern).CASE_INSENSITIVE).matcher(#xpath(payload, '//databaseName')).find()"
I referred the following links before framing my expression:
https://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html
How to call a method of a class from expression in spring Integration
How to check if a String contains another String in a case insensitive manner in Java?
Am I missing anything in the expression?