public static boolean isAPageTag(String str, boolean state) {
        if (state == true) {
            StringUtility.pattern = OPEN_PAGE_TAG;
        } else {
            StringUtility.pattern = CLOSE_PAGE_TAG;
        }

        StringUtility.matcher = pattern.matcher(str);
        return StringUtility.matcher.matches();
    }