Skip to content

Backslash is swallowed when unescaping sequence like \E\R\ #84

Description

@fathom-piotr

See this example piece of code:

msg = hl7.Message(separator="\r", sequence=[["MSH", "^~\\&"]])
unescaped = msg.unescape("\\E\\R\\")

unescaped should be \R\ because:

  • the first \E\ becomes a literal \
  • we're left with R\

The library, however, returns \R, as if the trailing slash could be skipped.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions