import org.hedgecode.chess.scanner.regex.RegexParams;
import org.hedgecode.chess.scanner.spi.ServiceRegistry;
-import static org.hedgecode.chess.scanner.ScannerConstants.*;
import static org.hedgecode.chess.scanner.regex.RegexBuilder.Type;
/**
);
}
- protected String regex(String source, String regex) {
- Matcher matcher = Pattern.compile(regex, Pattern.MULTILINE).matcher(source);
- if (matcher.find()) {
- return matcher.groupCount() > 0 ? matcher.group(1) : matcher.group();
- }
- return null;
- }
-
- protected boolean isPgnFormat(String source) {
- return regex(source, PGN_DETECT_REGEX) != null;
- }
-
private String assignUrlWithParams(String url, String params) {
return params != null
? url.concat(params)