当前位置:网站首页>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.
边栏推荐
- MySQL权限控制、分区表、快速复制表
- OptiFDTD应用:用于光纤入波导耦合的硅纳米锥仿真
- CSAPP Data Lab
- SIT221 Data Structures and Algorithms课程辅导
- 经典面试题 之 GC垃圾收集器
- 报错处理:org.xml.sax.SAXParseException: 不允许有匹配 “[xX][mM][lL]“ 的处理指令目标
- Deep Learning - Second Time
- MySQL的主从复制+读写分离+分库分表,看这一篇文章就够了
- 《人生若如初见》命运多舛,人物饱满,朱亚文角色反差太惊喜
- [4G/5G/6G专题基础-154]: 5G无线准入控制RAC(Radio Admission Control)
猜你喜欢

入职数字ic设计后的一些工作心得

Logstash日志数据写入异常排查问题总结

OpenCV founder: Open source must not be completely free!

Gaussian beam focused by thermal lens

Detailed explanation of new features of ES advanced function syntax

qtcreator调试webkit

ES6 advanced string processing new features

Multi-threaded ThreadPoolExecutor
OpenHarmony啃论文俱乐部-啃论文心得

多线程之ThreadPoolExecutor
随机推荐
Matlab矩阵(数组)元素过滤常见方法详解
YTU 2418: C语言习题 矩阵元素变换
AI+医疗:使用神经网络进行医学影像识别分析
YTU 2411: 谁去参加竞赛?【简单循环】
自动生成数据库设计文档利器
关于地图GIS的一次实践整理(下) Redis的GIS实践
Economic Misunderstandings in the Crypto World: Is Cash a Savings?Scarcity creates value?
夫妻一方婚内向异性大额转款,怎么判
网络安全笔记第四天day4(kali基本操作)
JS-DOM元素对象
2022年G1工业锅炉司炉题库及模拟考试
面试常考的7种排序算法
gRPC闭包调度器
ES6 advanced string processing new features
架构篇(二)架构的复杂度来源
SIT221 Data Structures and Algorithms课程辅导
多线程之ThreadPoolExecutor
comp3331-9331-21t2-midterm复习
shell脚本入门
Detailed explanation of new features of ES advanced function syntax