String () { final String text = getNode().getText().trim(); if (text.length() < 2) return null; final char adorn = text.charAt(text.length()-2); final CharacterIterator it = new StringCharacterIterator(text); int finish = 0; for (char ch = it.last(); ch != CharacterIterator.DONE; ch = it.previous()) { if (ch != adorn) { finish = it.getIndex(); break; } } int start = 0; if (text.charAt(0) == adorn) { for (char ch = it.first(); ch != CharacterIterator.DONE; ch = it.next()) { if (ch != adorn) { start = it.getIndex() + 1; break; } } } if (finish <= 0 || start < 0) return null; return text.substring(start, finish).trim(); }