code: private String extractSpecial(StringBuilder description, String specialName) {
          String result = null;
          int lp = description.indexOf(specialName);
          if (lp != -1) {
              // we've got to make sure we're not in the middle of a rule
              // (where specialName would actually get treated as
              // rule text)
              if (lp == 0 || description.charAt(lp - 1) == ';') {
                  // locate the beginning and end of the actual special
                  // rules (there may be whitespace between the name and
                  // the first token in the description)
                  int lpEnd = description.indexOf(";%", lp);
  
                  if (lpEnd == -1) {
                      lpEnd = description.length() - 1; // later we add 1 back to get the '%'
                  }
                  int lpStart = lp + specialName.length();
                  while (lpStart < lpEnd &&
                         PatternProps.isWhiteSpace(description.charAt(lpStart))) {
                      ++lpStart;
                  }
  
                  // copy out the special rules
                  result = description.substring(lpStart, lpEnd);
  
                  // remove the special rule from the description
                  description.delete(lp, lpEnd+1); // delete the semicolon but not the '%'
              }
          }
          return result;
      }
docs: This extracts the special information from the rule sets before the
  main parsing starts.  Extra whitespace must have already been removed
  from the description.  If found, the special information is removed from the
  description and returned, otherwise the description is unchanged and null
  is returned.  Note: the trailing semicolon at the end of the special
  rules is stripped.
  @param description the rbnf description with extra whitespace removed
  @param specialName the name of the special rule text to extract
  @return the special rule text, or null if the rule was not found