There is cool feature in IDEA to check your regex in Java.
When you hit Alt+Enter over your selected pattern, you get:
And if you choose Check RegExp, you get something like this:
But if you try same thing using Scala there is no Check RegExp option. I've tried hitting Alt+Enter for each of following lines of code:
val myRegex = """\w""".r
val myRegex2:Pattern = Pattern.compile("""\w""")
val myregex3 = new Regex("""\w""")
but no Check RegExp option showed. Any idea how to "enable" this feature to work with Scala?
Expanding the tip of @ziggystar, if you have the IntelliLang plugin installed, you can "inject" Regex syntax into a string. There is a message though stating that the injection was temporary, and the injection doesn't survive IntelliJ restart.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With