You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment regex is checked with the same function as strings.
This results in the compiler rejecting regular expressions that are valid in the Java implementation, the system is based on,
due to some escape sequences being illegal in strings.
As an example, the following program is currently rejected:
def main(): Unit \ IO = Regex.isMatch(regex"\w", "W") |> println
At the moment
regex
is checked with the same function as strings.This results in the compiler rejecting regular expressions that are valid in the Java implementation, the system is based on,
due to some escape sequences being illegal in strings.
As an example, the following program is currently rejected:
The issues stems from the following code:
flix/main/src/ca/uwaterloo/flix/language/phase/Weeder.scala
Lines 1746 to 1752 in dcb8dba
The weeder should be updated to allow escape sequences from: https://docs.oracle.com/en%2Fjava%2Fjavase%2F21%2Fdocs%2Fapi%2F%2F/java.base/java/util/regex/Pattern.html#cg
The text was updated successfully, but these errors were encountered: