The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 50: | Line 50: | ||
<pre> |
<pre> |
||
\ exe '%s:'. |
\ exe '%s:'. |
||
− | \ '\cCOPYRIGHT\s*\%((c)\|©\|& |
+ | \ '\cCOPYRIGHT\s*\%((c)\|©\|©\)\?\s*'. |
\ '\%([0-9]\{4}\(-[0-9]\{4\}\)\?,\s*\)*\zs'. |
\ '\%([0-9]\{4}\(-[0-9]\{4\}\)\?,\s*\)*\zs'. |
||
\ '\('. |
\ '\('. |
||
Line 63: | Line 63: | ||
\ '&, '.strftime("%Y").':e' | |
\ '&, '.strftime("%Y").':e' | |
||
\ exe '%s:'. |
\ exe '%s:'. |
||
− | \ '\cCOPYRIGHT\s*\%((c)\|©\|& |
+ | \ '\cCOPYRIGHT\s*\%((c)\|©\|©\)\?\s*'. |
\ '\%([0-9]\{4}\%(-[0-9]\{4\}\)\?,\s*\)*\zs'. |
\ '\%([0-9]\{4}\%(-[0-9]\{4\}\)\?,\s*\)*\zs'. |
||
\ '\%('.strftime("%Y").'\)\@!\([0-9]\{4\}\)'. |
\ '\%('.strftime("%Y").'\)\@!\([0-9]\{4\}\)'. |
||
Line 76: | Line 76: | ||
Summary: Replace all lines with a copyright notice, that do NOT end in the previous or current year, with a comma and the current year. |
Summary: Replace all lines with a copyright notice, that do NOT end in the previous or current year, with a comma and the current year. |
||
*'''<code>%s:</code>''' - start a "replace in all lines" search, using ':' rather than the customary '/' for clarity. |
*'''<code>%s:</code>''' - start a "replace in all lines" search, using ':' rather than the customary '/' for clarity. |
||
− | *'''<code>\cCOPYRIGHT\s*\%((c)\|©\|& |
+ | *'''<code>\cCOPYRIGHT\s*\%((c)\|©\|©\)\?\s*</code>''' - find lines containing the copyright flag (copyright {optional symbol}) as in the simple method. |
*'''<code>\%({below}\)*</code>''' - match any number of year ranges followed by commas, but DO NOT use them for backreferences. |
*'''<code>\%({below}\)*</code>''' - match any number of year ranges followed by commas, but DO NOT use them for backreferences. |
||
:*'''<code>[0-9]\{4}\(-[0-9]\{4\}\)\?,\s*</code>''' - match a year or year range, followed by a comma and whitespace. |
:*'''<code>[0-9]\{4}\(-[0-9]\{4\}\)\?,\s*</code>''' - match a year or year range, followed by a comma and whitespace. |
||
Line 93: | Line 93: | ||
Summary: Replace all remaining lines with a copyright notice, that do NOT end in the current year (i.e. they end in the previous year), with a hyphen and the current year. |
Summary: Replace all remaining lines with a copyright notice, that do NOT end in the current year (i.e. they end in the previous year), with a hyphen and the current year. |
||
*'''<code>%s:</code>''' - start a "replace in all lines" search, using ':' rather than the customary '/' for clarity. |
*'''<code>%s:</code>''' - start a "replace in all lines" search, using ':' rather than the customary '/' for clarity. |
||
− | *'''<code>\cCOPYRIGHT\s*\%((c)\|©\|& |
+ | *'''<code>\cCOPYRIGHT\s*\%((c)\|©\|©\)\?\s*</code>''' - find lines containing the copyright flag (copyright {optional symbol}) as in the simple method. |
*'''<code>\%({below}\)*</code>''' - match any number of year ranges followed by commas, but DO NOT use them for backreferences. |
*'''<code>\%({below}\)*</code>''' - match any number of year ranges followed by commas, but DO NOT use them for backreferences. |
||
:*'''<code>[0-9]\{4}\(-[0-9]\{4\}\)\?,\s*</code>''' - match a year or year range, followed by a comma and whitespace. |
:*'''<code>[0-9]\{4}\(-[0-9]\{4\}\)\?,\s*</code>''' - match a year or year range, followed by a comma and whitespace. |