Skip to content
Snippets Groups Projects
Commit 388e9704 authored by Matyáš Latner's avatar Matyáš Latner
Browse files

Chenged copyright regexp to check generic email

parent d0385f5d
Branches
Tags
No related merge requests found
......@@ -31,7 +31,9 @@ import java.util.regex.Pattern;
public class CopyrightTest {
private static final String COPYRIGHT_PATTERN = ".*Copyright \\(C\\) \\d{4} CZ\\.NIC, z\\.s\\.p\\.o\\. <info@tablexia\\.cz>.*" +
private static final String EMAIL_PATTERN = "(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])";
private static final String COPYRIGHT_PATTERN = ".*Copyright \\(C\\) \\d{4} CZ\\.NIC, z\\.s\\.p\\.o\\. <" + EMAIL_PATTERN + ">.*" +
"This program is free software: you can redistribute it and/or modify.*" +
"it under the terms of the GNU General Public License as published by.*" +
"the Free Software Foundation, either version 3 of the License, or.*" +
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment