Class TemplateRegexMatcher

java.lang.Object
org.spdx.utility.compare.TemplateRegexMatcher
All Implemented Interfaces:
ILicenseTemplateOutputHandler

public class TemplateRegexMatcher extends Object implements ILicenseTemplateOutputHandler
Constructs a regular expression from a license or exception template and provide a matching method to see if code matching the template exists within the text provided Note that the regular expression assumes a fully normalized text string to match isTemplateMatchWithinText(String text) will return true if the text text matches the template getQuickMatchRegex() will return a regular expression with limited backtracking which can be used for a quick search getCompleteRegex() will return a regular expression for the entire license where getStartRegex(int wordLimit) will return a regular expression to match the beginning of a license and getEndRegex(int wordLimit) will return a regular expression to match the end of a license
Author:
Gary O'Neall