@@ -0,0 +1,562 @@
+package ch.epfl.scitas.patentcrawler;%0A%0Aimport java.util.regex.Pattern;%0Aimport java.util.regex.Matcher;%0A%0A/**%0A *  Patent regex detector to decide whether or not to archive a page/document.%0A */%0A%0Apublic class PatentRegexDetector %7B%0A%0A    Pattern pattern = Pattern.compile(%22(?i)U%5C%5C.*%5C%5Cs*S%5C%5C.*%5C%5Cs*Pat%5B(%5C%5C.)%7C(ent)%5D%22);%0A%0A    public Boolean detectPatentMentionIn( String text ) %7B%0A%0A%09Pattern pattern = Pattern.compile(%22(?i)U%5C%5C.*%5C%5Cs*S%5C%5C.*%5C%5Cs*Pat%5B(%5C%5C.)%7C(ent)%5D%22);%0A%09Matcher matcher = pattern.matcher(text);%0A%09    %0A%09if (matcher.find()) %7B%0A%09    return true;%0A%09%7D%0A%09return false;%0A    %7D%0A%7D%0A

add regex class to detect mentions of patents