Last active
August 29, 2023 06:15
-
-
Save CIAvash/a9415f910425c0435f50769a78e5ff28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my @symbols_to_remove = Q:w「- _ ! , : / ( ) [ ] . ' + ? = * \ " # $ % & { } | ; ~ \ < > @ ` ^」; | |
my @terms_to_ignore = <for and the with from that your git bin this not svn who can you like into all more one any | |
over non them are very when about yet many its also most lets just>; | |
my &sanitize = *.trans(@symbols_to_remove => ' ').lc.words.grep( | |
{ .chars ≥ 3 and not /^ <[0..9]>+ $/ and /^ <[a..z] + [0..9]>+ $/ } | |
).grep(none @terms_to_ignore).unique; | |
say sanitize "The.quick 'brown' 🦊 jumps-OvER th 1337 QUICK <dog>!"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment