Last active
January 31, 2025 16:01
-
-
Save smeech/fab7459c7c703659b7df3fc8e2b57649 to your computer and use it in GitHub Desktop.
[Ordinal suffixes] Superscript suffixes of ordinal numbers with some checking for validity. #espanso #regex
This file contains hidden or 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
| # Espanso superscript suffixes of ordinal numbers with some checking for validity | |
| matches: | |
| - regex: (?P<number>\s[1]|[0,2-9]1)st | |
| replace: "{{number}}ˢᵗ" | |
| - regex: (?P<number>\s[2]|[0,2-9]2)nd | |
| replace: "{{number}}ⁿᵈ" | |
| - regex: (?P<number>\s[3]|[0,2-9]3)rd | |
| replace: "{{number}}ʳᵈ" | |
| - regex: (?P<number>\s[0,4-9]|[1][\d]|[0,2-9][0,4-9])th | |
| replace: "{{number}}ᵗʰ" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment