Use existing class StringReplaceAllCall

This commit is contained in:
Owen Mansel-Chan
2025-03-25 11:38:07 +00:00
parent b5b252b10f
commit 441c79ebdf

View File

@@ -11,9 +11,8 @@
import java
from MethodCall replaceAllCall
from StringReplaceAllCall replaceAllCall
where
replaceAllCall.getMethod().hasQualifiedName("java.lang", "String", "replaceAll") and
//only contains characters that could be a simple string
replaceAllCall.getArgument(0).(StringLiteral).getValue().regexpMatch("^[a-zA-Z0-9]+$")
select replaceAllCall,