Skip to content

Make splitters support collections of strings as separators #37

Description

@jwodder

PrecededSplitter, SeparatedSplitter, and TerminatedSplitter should support separator being an Iterable[AnyStr], in which case input will effectively be split on re.compile("|".join(map(re.escape, separator))), but using a trie instead of a regex.

  • Ambiguities should resolve to the first match in the iterable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c:splittersenhancementNew feature or request thereforunder considerationDev has not yet decided whether or how to implement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions