-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
(From the forums topic https://forums.swift.org/t/inserting-regex-into-literal-regex-expressions/81070.)
When a regex has been declared e.g. via a literal expression:
let greeting = /(hello|hi)/
Then it can be nice to use this in another regex (this does work today):
let greetingSomeone = Regex {
greeting
ChoiceOf{ " "; ", " }
OneOrMore { .word }
}
It should be possible to insert the greeting
regex directly into a literal regex (the syntax might have to be different):
let greetingSomeone = /\(greeting)( |, )\w+/
Metadata
Metadata
Assignees
Labels
No labels