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

Integrated regex support #34

Open
sagebind opened this issue Jun 20, 2020 · 0 comments
Open

Integrated regex support #34

sagebind opened this issue Jun 20, 2020 · 0 comments

Comments

@sagebind
Copy link
Owner

It would be very handy if regex was built into the language syntax itself as an embedded language mode. This would give you syntax errors to catch early if you have a mistake in your regex! (Of course also allow creating a regex from a string.)

I imagine the syntax looking something like this:

# If matched, $results is a list of capture groups. If not, then nil
$results = "my string" =~ re#\w+#

The tricky part is that forward slashes are often used as delimiters, but those mean directory separators far more often in a shell.

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

1 participant