我要检查一些java类代码的头部分,我使用的是maven-license-plugin,并且我必须在常见头文件(文本)文件中指定常规表达允许这样的台词:正则表达式来匹配复杂的字符串或行
Portions Copyrighted 2013 andrea
或
Copyright 2008-2009 Company, Inc. All rights reserved.
你能帮助我吗?
头的模板是:
====================
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 2008-2009 company, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development
and Distribution License("CDDL") (the "License"). You may not use this file
except in compliance with the License.
You can obtain a copy of the License at https://xxx.yy.com/licenses/CDDL
See the License for the specific language governing permissions and limitations
under the License.
When distributing the Covered Code, include this CDDL Header Notice in each file
and include the License file at https://xxx.yy.com/licenses/CDDL.
If applicable, add the following below this CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
====================
你可以说说规则吗?比如哪个字符没有改变,哪些字符会改变? –
,我必须能够识别所发布的模板以及文件末尾的一行,例如部分版权所有2013 andrea以及第一版权之后的附加行:Copyright 2008-2009 Company,Inc.保留所有权利。 – andPat
对这个模板的唯一更改是这两个可能的添加,整个剩余的文本是相同的 – andPat