Here you can find the source of assertNotMatches(String name, String regExp, String actual)
public static void assertNotMatches(String name, String regExp, String actual)
//package com.java2s; //License from project: Apache License public class Main { public static void assertNotMatches(String name, String regExp, String actual) { if (matches(regExp, actual)) { throw new AssertionError(name + ": " + actual + " is matching " + regExp + " when it shouldn't!"); }// w ww .j a v a 2 s . c om } public static boolean matches(String regularExpression, String text) { if (text == null || regularExpression == null) { return false; } return text.matches(regularExpression); } }