Are there any changes in RegEx implementation in K...
# javascript
r
Are there any changes in RegEx implementation in Kotlin/JS 1.5.0? After upgrade from 1.4 to 1.5 I have an error like this
Uncaught SyntaxError: raw bracket is not allowed in regular expression with unicode flag
in
kotlin.js:44848
probably with this code:
Copy code
fun validateEmail(value: String): Boolean {
    return value.matches("^([a-zA-Z0-9\\-_.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z\\-0-9]{2,}))$".toRegex())
}
😕 1
this is failing when 1.5.0 is selected, but works fine with 1.4.30
s
@Robert Jaros Done some looking for you. While your example doesn't work, I've not faced an issue on my end as I was building my expressions using
RegExp
I have 1.5.0 also and IR comp. Here's an example that might be a workaround for you. https://pl.kotl.in/RQ8GZ-8Hx
I also has a look at your RegEx and it seems to be invalid. The link above has a regex that I use for Emails. Feel free to grab it!
🙏 1