Lists of primitives aren’t supported in Mendix. You can create a new non-persistent Entity with just a string attribute and create an object of that entity for each match. You can then return a list of those objects at the end of your java action.
However, are you sure that what you’re trying to achieve isn’t possible with string operations within Mendix? Specifically find, replace and/or substring?
Kind regards,
Luc