Stream: shorthand
Topic: base64Binary type
Nick Freiter (Apr 30 2020 at 20:28):
The regular expression we use to validate base64Binary strings is (\s*([0-9a-zA-Z\+\=]){4}\s*)+
, which we copied directly from https://www.hl7.org/fhir/datatypes.html#primitive. However, this regex seems incorrect. It does not allow the /
character, which is used in base64 binary encoding. In the FHIR schemas for XML and JSON, a different regex is used: (\s*([0-9a-zA-Z\+/=]){4}\s*)+
. This regular expression does allow for the /
character. It seems to me like we want to use the second regular expression, not the first. But I'm not certain enough in my knowledge of base64Binary in FHIR to just ignore the documentation and change it. If any FSH/SUSHI users have a bit more experience with base64Binary and could help us figure out which regex to use, we'd appreciate it!
Grahame Grieve (Apr 30 2020 at 22:55):
second and i'll have to fix the first
Last updated: Apr 12 2022 at 19:14 UTC