Does anyone know how to adapt the search tree to handle limited regular expressions? The task, taking into account the file name, is to find all the nodes corresponding to this file name. Nodes may contain the usual globs file names (* and?). Obviously, since this is a search tree, speed makes sense.
EDIT: I have to add that the most important thing for speed is the average time to rule out a match. That is, in most cases, the match will not be performed.
Example: suppose the tree contains the following nodes:
foo, bar, foo *, * bar, foo? bar
A foo search will return nodes 1 and 3. A bar search will return nodes 2 and 4. A phob search will not return a single node. A fooxbar search will return node 5. A foobar search will return nodes 3 and 4.
source share