Skip to content

Commit

Permalink
#74 IEEE simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Mar 15, 2024
1 parent 7d14050 commit 1e59137
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bibcop.pl
Expand Up @@ -675,7 +675,10 @@ sub fix_journal {
sub fix_publisher {
my ($value) = @_;
$value = fix_capitalization($value);
$value =~ s/^ACM($|[^A-Z0-9a-z].*$)/ACM/g;
my @orgs = qw/ACM IEEE/;
foreach my $org (@orgs) {
$value =~ s/^\Q$org\E($|[^A-Z0-9a-z].*$)/$org/g;
}
return $value;
}

Expand Down
3 changes: 3 additions & 0 deletions perl-tests/fixing.pl
Expand Up @@ -46,6 +46,9 @@ package bibcop;

fixes('publisher', 'ACM New York, NY, USA', 'ACM');
fixes('publisher', 'ACME', 'ACME');
fixes('publisher', 'IEEE Computer Society', 'IEEE');
fixes('publisher', 'IEEE-Society', 'IEEE');
fixes('publisher', 'IEEEth', 'IEEEth');

fixes('pages', '13', '13');
fixes('pages', '13-', '13');
Expand Down

0 comments on commit 1e59137

Please sign in to comment.