带下划线的反斜线IntelliJ [英] Underlined backslash IntelliJ

查看:105
本文介绍了带下划线的反斜线IntelliJ的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用反斜杠作为正在处理的序列化格式的转义字符.我将其作为常量,但是IntelliJ在其下划线并以红色突出显示.悬停时,它不会显示任何错误消息或任何信息,说明为什么它不喜欢它.

I am using a backslash as an escape character for a serialization format I am working on. I have it as a constant but IntelliJ is underlining it and highlighting it red. On hover it gives no error messages or any information as to why it does not like it.


这是什么原因,我该如何解决?

What is the reason for this and how do I fix it?

推荐答案

IntelliJ比我聪明,并且意识到我在需要两个反斜杠的正则表达式中使用此字符,但是IntelliJ还假设我的代码是微不足道的头脑可以找到问题,而无需提供任何有关我的信息.

IntelliJ is smarter than I am and realised that I was using this character in a regular expression where 2 backslashes would be needed, however, IntelliJ also assumed that my puny mind could find the problem without giving me any information about it.

这篇关于带下划线的反斜线IntelliJ的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆