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

Clarify expected behavior of replace and replaceMatches

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Medium Medium

    Description

      Consistent with this FHIRPath tracker:
      https://jira.hl7.org/browse/FHIR-36257

      Clarify that the .matches() function uses partial match semantics, and give the following example:

      define TestMatches: Matches('http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1', 'Library')
      // returns true

      The start/end of line markers `^`, `$` can be used to match the entire string.

      ```cql
      'http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1'.matches('Library') // returns true
      'N8000123123'.matches('^N[0-9]

      {8}$') // returns false as the string is not an 8 char number (it has 10)
      'N8000123123'.matches('N[0-9]{8}

      ') // returns true as the string has an 8 number sequence in it starting with `N`
      ```

      Attachments

        Activity

          People

            Unassigned Unassigned
            bryn.rhodes Bryn Rhodes
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: