Java tutorial
//package com.java2s; //License from project: Apache License import static java.lang.String.format; public class Main { public static String doesNotExistInEntirePage(final String path) { final String processedPath = (path.startsWith("//")) ? format(".%s", path) : (path.startsWith("(/")) ? format("(./%s", path.substring(2)) : ".//" + path; return format("/html[not(%s)]", processedPath); } }