Closed alexander-beedie closed 1 week ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.76%. Comparing base (
6804f33
) to head (e0f3d8b
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
New selectors, making it even easier to classify column names by character type:
cs.alphanumeric()
: only names composed of letters and digits.cs.alpha()
: only names composed of letters.cs.digit()
: only names composed of digits.One of the nice bonuses in having separate selectors for this is making sure that non-ASCII letters are handled automatically, eg: accented characters in words such as "tweeΓ«ntwintig", kanji such as "ζ±δΊ¬", hangul, etc.
(I also suspect that, even amongst users familiar with regular expressions, a reasonable number wouldn't immediately know the equivalent
cs.matches
pattern^[\p{Alphabetic}]+$
, which is also a little more cryptic in a codebase π€)There is an optional flag
ascii_only
if you want to limit the definition of "alphabetic" to ASCII, but having Unicode letters recognised by default is a good out-of-the-box experience for more languages.Examples
Select columns with alphabetic names; note that accented characters and kanji are recognised as valid:
Constrain the definition of "alphabetic" to ASCII characters:
Select columns with non-ASCII alphabetic names :)
Select all columns except for those with alphabetic names:
Select alphanumeric names:
Select alphanumeric names, constraining the definition to ASCII characters: