Skip to content

Handling Commas Before Suffixes #1

@Takaitra

Description

@Takaitra

Thanks for a great parsing script--it's exactly what I needed for a project that I'm working on.

Physicians place a comma after their name and before their professional suffix as in John Smith, MD. parse-names.js is including this comma as part of the last name. One fix for this is to modify the trim function on line 24 to also remove commas.

return this.replace(/^\s+|\s+$|\,$/g,"");

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