当前位置:网站首页>IDE compilation error: Dangling metacharacter
IDE compilation error: Dangling metacharacter
2022-08-11 02:47:00 【Hui Jing】
Dangling metacharacter means: the current character calculation has other meanings, and it is not sure what you mean by it.Similar to Chinese polysemy.
As shown in the figure below, when we want to split the "+" in the string, the compilation fails.
Solution:
The first: write "+" as "\+"
The second. Convert "+" into "[+]”;
General metacharacters also include: “.$|()[{^?*+\”.
Of course, regular expressions like "\" and "|" have special meanings. We recommend the second method, otherwise another meaning may appear.
For example:
public class Test {public static void main(String[] args) {String str = "aaa|bbb|ccc|ddd";String[] split = str.split(span>"|");for(String sp: split) {System.out.println(sp);span>}}}
It was found that we compiled successfully, but when I started the main method, the console output:
Indicates when the empty string to split.
边栏推荐
猜你喜欢
DOM-DOM树,一个DOM树有三种类型的节点
《人生若如初见》命运多舛,人物饱满,朱亚文角色反差太惊喜
ESP32的环境配置(arduino arduino2.0 VScode platform哪个好用?)
添加用户报错useradd: cannot open /etc/passwd
Some work experience after joining the digital ic design
js原型和原型链及原型继承
[oops-framework] Template project [oops-game-kit] Introduction
关于地图GIS开发事项的一次实践整理(上)
Gaussian beam focused by thermal lens
Vim and copy and paste from the outside (don't need to install the plugin)
随机推荐
redis学习五redis的持久化RDB,fork,copyonwrite,AOF,RDB&AOF混合使用
ES6 advanced string processing new features
Idea (优选)cherry-pick操作
leetcode:358. K 距离间隔重排字符串
(Nips-2015)空间变换器网络
3342: String manipulation problem solving
自动生成数据库设计文档利器
A surviving spouse of the opposite sex within large turn paragraph, what for
八.数据的存储
一言(ヒトコト)Hitokoto API
CSAPP Data Lab
掌握这几招,轻松K.O面试官,Offer拿到吐
117. 本地开发好的 SAP UI5 应用部署到 ABAP 服务器时,中文字符变成乱码的原因分析和解决方案
Deep Learning - Second Time
(CVPR-2017)在身体和潜在部位学习深度上下文感知特征以进行行人重识别
BUU刷题记录
comp3331-9331-22t1-midterm复习辅导-tutorial week 5
【idea 报错】 无效的目标发行版:17 的解决参考
comp3331-9331-21t1-midterm复习
①CAS SSO单点登录框架源码深度分析