sub()
STDLIB function: formalize the syntax for using capturing groups in the replace
string
#705
Labels
K-clarification
(Kind) Clarifications regarding the WDL specification.
S02-needs-owner
(State) An issue that needs an individual to write an RFC.
T-stdlib
(Topic) Issues related to the standard library.
Z-specification-change
(Metadata) An issue or PR related to a specification change.
The SPEC (https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#sub) is explicit that the
pattern
string must be POSIX ERE compliant, but doesn't say anything about what's permitted in thereplace
string. This leaves it up to the engine whether capturing groups from the RE can be used in thereplace
string, and there isn't any uniformity as to the syntax for that, leading to non-portable WDL.e.g.
sprocket
uses theregex
crate which supports$<ref>
syntax for capturing groups in thereplace
string. I think thatminiwdl
uses\<ref>
syntax (or that's the syntax for the Python sub() func). No idea what cromwell does.One standard should be enforced instead of leaving it up to the engine. I don't think the specific standard (
$ref
or\ref
) matters, so long as it's portable across engines.The text was updated successfully, but these errors were encountered: