-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels