glob_to_regex
glob_to_regex(
pattern: str ,
)-> ‘re.Pattern’
Translate a glob to the regex which matches what SQLite’s GLOB does.
Every glob DASCore reads – a spool query, a dataframe filter, a string coordinate – means what SQLite’s GLOB means, since the index answers some of those queries in SQL and one pattern must not mean two things depending on which side answers it. SQLite is not fnmatch: a class is negated with [^...], where fnmatch spells that [!...] and reads a leading ! as a literal. An unterminated class matches nothing, as it does in SQLite; a class a regex cannot express at all (a reversed range, which SQLite reads leniently) matches nothing here rather than being guessed at.