Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

escape sequences in regex #270

Open
mlin opened this issue Jan 10, 2021 · 2 comments
Open

escape sequences in regex #270

mlin opened this issue Jan 10, 2021 · 2 comments

Comments

@mlin
Copy link

mlin commented Jan 10, 2021

I was just battening down miniwdl's parsing of escape sequences in string literals, and got tripped up here:

String outputJson = basename(yaml, "\.ya?ml$") + ".json"

Looking at the WDL spec on escape sequences, do you think there should be a double-backslash instead of single here? (Would that break it?)

@rhpvorderman
Copy link
Contributor

Given that this is a regular expression there is also this issue that comes into play: openwdl/wdl#243

In valid POSIX ERE it would be one slash, unless I am mistaken. So this makes the SPEC self-conflicting? 😕

@jdidion
Copy link

jdidion commented Jun 22, 2021

I just came to report this as well. The 1.1 spec states explicitly that regexps used with sub need to be "double-escaped". Unfortunately it is not stated explicitly in 1.0, but it is implied by the example used with the sub command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants