src/main/java/com/github/ricksbrown/cowsay/CowFormatter.java
private static String extractCowTemplate(final String cow) throws CowParseException {

		Matcher matcher = COWSTART_RE.matcher(cow);
		if (matcher.find(0)) {
			String result = matcher.replaceFirst("");
			return result;
		} else {
			throw new CowParseException("Could not parse cow " + cow);
		}
	}
private static String extractCowTemplate(final String cow) throws CowParseException {

		Matcher matcher = COWSTART_RE.matcher(cow);
		if (matcher.find(0)) {
			String result = matcher.replaceFirst("");
			return result;
		} else {
			throw new CowParseException("Could not parse cow " + cow);
		}
	}
Extracts the ascii art part of the cowfile, removing any before or after PERL comments, variable assignments, weird EOC markers etc.
@param cow The raw cowfile content.
@return The ascii art portion of the cowfile.
@throws CowParseException if the cowfile cannot be parsed.