code: public static boolean checkTextValueFormat (final String value) {
          if (value == null) return false;
          final Matcher matcher = TEXT_VALUE_PATTERN.matcher(value);
          return matcher.matches();
      }
docs: Checks if the <i>value</i> parameter is a properly formatted String value, i.e. if it only contains the allowed
  characters. The list of legal characters is specified in RFC3720, section 5.1. All characters from that list
  except for '~' and the null character are considered legitimate.
  <p>
  If those constraints are violated, the method returns <code>null</code>.
  
  @param value the <i>value</i> part of a <i>key=value</i> pair, which is a String text parameter
  @return the properly formatted value String or <code>null</code>