invenia / AxisSets.jl

Consistent operations over a collection of KeyedArrays
MIT License
5 stars 0 forks source link

Support `occursin` matching on segments #48

Open rofinn opened 3 years ago

rofinn commented 3 years ago

For example, we should be able to define patterns like:

Pattern(:train, :input, (:foo, :bar))

which would match (:train, :input, :foo) or (:train, :input, :bar), but not (:train, :input, :baz)

Similarly, I could see an argument for something like:

Pattern(:train, :input, r"foo.*")

which would match (:train, :input, "foo.1") and (:train, :input, "foo.2), but not (:train, :input, "bar.1")

NOTE: These should both be fallbacks, so that (:train, :input, (:foo, :bar)) or (:train, :input, r"foo.*") would take priority if they matched first.