Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Strip numbers aggressively
Previous regex was wrong anyway.
  • Loading branch information
AlexDaniel committed Aug 16, 2019
1 parent 16eb2f7 commit 3965841
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbin/Tellable.p6
Expand Up @@ -44,9 +44,9 @@ sub normalize-weirdly($_ is copy) {
s:!g/\W+$//; # garbage at the end
s:!g/^\W+//; # garbage at the beginning
s:g/-//; # hyphens
s:!g/^(.*?)\d+/$0/; # numbers at the end
s:g/(.)$0/$0/; # accidentally doubled letters
$_
s:g/(.)$0+/$0/; # accidentally doubled characters
s:g/\d// if S:g/\d//.chars > 4; # remove numbers if we still have letters
$_;
}

#| listen for messages
Expand Down

0 comments on commit 3965841

Please sign in to comment.