public String[] parse(final String s) {
checkNotEmptyString("s", s);
final RegexMatcher matcher = regexFactory.createMatcher(pattern, s);
final String[] values = new String[LITERAL_VALUES_LENGTH];
if (matcher.matches()) {
final String ntriplesLiteral = matcher.group(LITERAL_INDEX);
values[0] = nTripleUtil.unescapeLiteral(ntriplesLiteral);
values[1] = matcher.group(LANGUAGE_INDEX);
values[2] = matcher.group(DATATYPE_INDEX);
}
return values;