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

Alternate regex syntax #114

Open
ingydotnet opened this issue Mar 11, 2024 · 1 comment
Open

Alternate regex syntax #114

ingydotnet opened this issue Mar 11, 2024 · 1 comment
Labels
core Language and compiler issues

Comments

@ingydotnet
Copy link
Member

We have /^.*\/foo\/bar.*$/ now which leads to leaning toothpick syndrome.

Clojure uses #"^.*/foo/bar.*$".

We can't use that because it would be a yaml comment a most of the time.

We can use \#"^.*/foo/bar.*$" though.

We could also use \"^.*/foo/bar.*$".

Python has ``r"^./foo/bar.$"so we could use\r"^./foo/bar.$"`.

I like \r"..." because we could later make other kinds of strings with other letters.

@ingydotnet ingydotnet added the core Language and compiler issues label Mar 11, 2024
@xanni
Copy link

xanni commented Mar 11, 2024

Yes, I also like \r"..."

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

No branches or pull requests

2 participants