Hi guys. Are these two operations equal in Kotlin?...
# announcements
e
Hi guys. Are these two operations equal in Kotlin?
Copy code
"""[ \t\f\v]+""".toRegex()
"[ \\t\\f\\v]+".toRegex()
h
If you're unsure, in intellij, you can use the context menu to convert it back and forth from a regular string, and a template string. Furthermore, you can even set the language options for the string to regex!
e
@Hamza interesting, thanks! What do you mean with "you can even set the language options for the string to regex"?
h
Screenshot 2020-03-31 at 20.00.42.png
e
@Hamza ohhh okay! Got it