Skip to content

Integrated regex support #34

Description

@sagebind

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions