I want to know how to use "matches()" to catch when a duplicate appears in my String "xmlString" (which contains an xml file).

So for example the following fragment should return "false":
...