Bug 127861 [DataBinding] Mark API provisional
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/validator/RegexStringValidator.java
*/
	public RegexStringValidator(String partiallyValidRegex,
			String fullyValidRegex, String hint) {
		super();
		this.fragmentRegex = Pattern.compile(partiallyValidRegex);
		this.fullValueRegex = Pattern.compile(fullyValidRegex);
		this.hint = hint;
	}
    
	/* (non-Javadoc)
	 * @see org.eclipse.jface.databinding.validator.IValidator#isPartiallyValid(java.lang.Object)
	 */
	public String isPartiallyValid(Object fragment) {
        Matcher matcher = fragmentRegex.matcher((String)fragment);
		if (matcher.find())
            return null;
        return hint;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
	 */
	public String isValid(Object value) {
        String stringValue = (String) value;
        Matcher matcher = fullValueRegex.matcher(stringValue);
        if (matcher.find())
            return null;
        return hint;
	}
}