in reply to Edge case in Text::Glob
Also, I don't quite remember the details, but a long time ago I found out that Text::Glob was not good enough for my purposes and so I wrote my own version (Net::SFTP::Foreign::Helpers::_glob_to_regex).
Retrospectively, what I learned from there is that rolling out your own version of a glob-to-regex compiler supporting basic wildcards is not too difficult. But then, last year, I had to write a feature rich glob-to-regex compiler (in Scala this time, scala-glob), and it got quite complex.
IIRC, one of the main limitations of Text::Glob is that you can not use it efficiently to match globs spanning more than a directory level (as in f*oo/b*ar/*.txt) against tree data structures like file systems.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Edge case in Text::Glob
by LanX (Saint) on Mar 01, 2022 at 16:37 UTC | |
by Fletch (Bishop) on Mar 01, 2022 at 17:45 UTC | |
by LanX (Saint) on Mar 02, 2022 at 15:42 UTC | |
by Fletch (Bishop) on Mar 02, 2022 at 16:29 UTC | |
by LanX (Saint) on Mar 02, 2022 at 18:06 UTC |