Labels now need to terminate by a word character (non-dot), otherwise partial labels are matched and fail

git-svn-id: https://ipscan.svn.sourceforge.net/svnroot/ipscan/trunk@151 375186e5-ef17-0410-b0b6-91563547dcda
This commit is contained in:
angryziber 2007-07-12 22:34:59 +00:00
parent cffb456654
commit a2ea36df63

View File

@ -96,8 +96,8 @@ public class LabelsTest {
private void findAndTestLabels(File file) throws IOException {
// TODO: tune these regexps
final Pattern LABELS_REGEX = Pattern.compile("Label.{1,60}\"([a-z]\\w+?\\.[a-z][\\w.]+?)\"");
final Pattern EXCEPTION_REGEX = Pattern.compile("new\\s+?(\\w+?Exception)\\(\"([\\w.]+?)\"");
final Pattern LABELS_REGEX = Pattern.compile("Label.{1,60}\"([a-z]\\w+?\\.[a-z][\\w.]+?\\w)\"");
final Pattern EXCEPTION_REGEX = Pattern.compile("new\\s+?(\\w+?Exception)\\(\"([\\w.]+?\\w)\"");
BufferedReader fileReader = new BufferedReader(new FileReader(file));
StringBuffer sb = new StringBuffer();