String#matches() takes a regex parameter as a parameter in which anchors are implicit. This way your regex pattern will be matched from beginning to end of line.
Since your line does not start with "kind" , it means it returns false .
Now, according to your current problem, I think there is no need to use regex . Just using String#contains() method will work fine: -
oneLine.contains("kind");
Or, if you want to use matches , then create a regular expression to match the full string: -
oneLine.matches(".*kind.*");
source share