Maybe this is the wrong channel. I have a question...
# compiler
k
Maybe this is the wrong channel. I have a question about Regex.
Represents a compiled regular expression
When we say it's compiled, does that mean the regex is transformed into a state machine? I recently read this article and thought it was very interesting. https://swtch.com/~rsc/regexp/regexp1.html
s
Wrong channel yes, but thats generally what compiling a regex means
e
note that Kotlin's Regex wraps Java's Pattern (or JavaScript's RegExp, or a custom Java-compatible implementation on native) and thus is not a regular expression in the mathematical sense, and cannot be represented by a DFA/NFA