final String toTokenString ( ) throws IOException { String [ ] stringToFormat = toFinalString ( null ) ; return String . join ( "|" , Arrays . asList ( stringToFormat ) ) ; }
Method for getting the formatted match as a single string . In case of multiple matches it joins them using a regular expression operator | .