Skip to content

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

@fathom-piotr

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.

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