AFAICT, there are only two files where the separator does not start in
the first column:

20110118/nominated-members.txt
20150324/nominated-members.txt

Maybe it would be better to fix these anomalies and then use an RE of the form:

/^-{10,}+\s*$/


On 13 March 2017 at 13:12, sebb <[email protected]> wrote:
> oops, hit send by mistake ...
>
> On 12 March 2017 at 17:28,  <[email protected]> wrote:
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> rubys pushed a commit to branch master
>> in repository https://gitbox.apache.org/repos/asf/whimsy.git
>>
>> The following commit(s) were added to refs/heads/master by this push:
>>        new  da2d836   handle gstein's dashes; sort bettter
>> da2d836 is described below
>>
>> commit da2d83695bee1de2ca92fb2963faf442d95dcae4
>> Author: Sam Ruby <[email protected]>
>> AuthorDate: Sun Mar 12 13:27:55 2017 -0400
>>
>>     handle gstein's dashes; sort bettter
>> ---
>>  lib/whimsy/asf/nominees.rb  | 2 +-
>>  www/members/nominations.cgi | 6 +++---
>>  2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/lib/whimsy/asf/nominees.rb b/lib/whimsy/asf/nominees.rb
>> index 99d8b0a..9b100a1 100644
>> --- a/lib/whimsy/asf/nominees.rb
>> +++ b/lib/whimsy/asf/nominees.rb
>> @@ -13,7 +13,7 @@ module ASF
>>        meetings = ASF::SVN['private/foundation/Meetings']
>>        nominations = 
>> Dir["#{meetings}/*/nominated-members.txt"].sort.last.untaint
>>
>> -      nominations = File.read(nominations).split(/^\s*---+\s*/)
>> +      nominations = File.read(nominations).split(/^\s*---+--\s*/)
>
> Probably more efficient to use:
>
> nominations = File.read(nominations).split(/^\s*-----+/)
>  or
> nominations = File.read(nominations).split(/^\s*-{5,}/)
>
> Combine the dashes to avoid back-tracking
>
> Not sure it helps to have trailing optional spaces unless there is an
> EOL anchor.
> Was it intended to suppress all but WS after the ----?
> If so, adding the EOL anchor would have fixed the gstein comments.
>
>>        nominations.shift(2)
>>
>>        nominees = {}
>> diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
>> index 43f7db1..3f98d22 100755
>> --- a/www/members/nominations.cgi
>> +++ b/www/members/nominations.cgi
>> @@ -33,7 +33,7 @@ end
>>  MEETINGS = ASF::SVN['private/foundation/Meetings']
>>  meeting = Dir["#{MEETINGS}/2*"].sort.last
>>  nominations = IO.read("#{meeting}/nominated-members.txt").
>> -  scan(/^-+--\s+(.*?)\n/).flatten
>> +  scan(/^---+--\s+(.*?)\n/).flatten
>>
>>  nominations.shift if nominations.first == '<empty line>'
>>  nominations.pop if nominations.last.empty?
>> @@ -109,9 +109,9 @@ _html do
>>
>>        _p.count "Count: #{emails.count}"
>>
>> -      # attempt to sort reports by PMC name
>> +      # attempt to sort reports by nominee name
>>        emails.sort_by! do |mail|
>> -        mail.subject.downcase.gsub('- ', '')
>> +        mail.subject.downcase.gsub('- ', '').sub(/\[.*?\]\s*/, '')
>>        end
>>
>>        # output an unordered list of subjects linked to the message archive
>>
>> --
>> To stop receiving notification emails like this one, please contact
>> ['"[email protected]" <[email protected]>'].

Reply via email to