summaryrefslogblamecommitdiffstats
path: root/parsers/Footer.java
blob: 568d0e78d56b878737e99e6830fa66c9fb9e3367 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                      
                                                                             





                                                                           
package scruf.parsers;

import java.util.regex.*;
import scruf.io.*;
public class Footer implements Parser {
    public String parse(String fileContent) {
	Pattern pattern = Pattern.compile("\\-{70}\\n(.+)\\n\\-{70}");
	Matcher matcher = pattern.matcher(fileContent);
	StringBuffer sbuffer = new StringBuffer();
	while(matcher.find()) {
	    PresentFile.footer = "\n<footer>"+matcher.group(1)+"</footer>\n";
	    fileContent = new NullIt().nullIt(fileContent,matcher.group());
	}

	return fileContent;
    }
}