Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-37406

The regex for the code data type does not match the restrictions in the text

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive
    • Icon: Medium Medium
    • FHIR Core (FHIR)
    • R4
    • Modeling & Methodology
    • Datatypes
    • Hide

      We will change the regex to be as specified in the description.

      Show
      We will change the regex to be as specified in the description.
    • Lloyd McKenzie / Abdul-Malik Shakir: 3-0-0
    • Correction
    • Compatible, substantive
    • R5

    Description

      The text of the code description specifies, "Technically, a code is restricted to a string which has at least one character and no leading or trailing whitespace, and where there is no whitespace other than single spaces in the contents".  One of the usages of the `\s` metacharacter in the current regex is incorrect because it allows characters other than space, e.g., tab, carriage return, newline, etc..  I believe the correct regex to be as follows: 

      [^\s]+( [^\s]+)*

      Attachments

        Activity

          People

            Unassigned Unassigned
            mfaughn Michael Faughn
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: