Advertisement
smeech

Ordinal suffixes

Mar 18th, 2024 (edited)
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.38 KB | Software | 0 0
  1. # Espanso superscript suffixes of ordinal numbers with some checking for validity
  2.   - regex: (?P<number>\s[1]|[0,2-9]1)st
  3.     replace: "{{number}}ˢᵗ"
  4.   - regex: (?P<number>\s[2]|[0,2-9]2)nd
  5.     replace: "{{number}}ⁿᵈ"
  6.   - regex: (?P<number>\s[3]|[0,2-9]3)rd
  7.     replace: "{{number}}ʳᵈ"
  8.   - regex: (?P<number>\s[0,4-9]|[1][\d]|[0,2-9][0,4-9])th
  9.     replace: "{{number}}ᵗʰ"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement