当前位置:网站首页>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.
边栏推荐
- comp3331-9331-21t1-midterm复习
- Future Trends in Vulnerability Management Programs
- 自动生成数据库设计文档利器
- 架构篇(二)架构的复杂度来源
- Salesforce解散中国团队,什么样的CRM产品更适合中国人
- async和await的理解和用法
- 通过热透镜聚焦的高斯光束
- 2022年广东省安全员A证第三批(主要负责人)操作证考试题模拟考试平台操作
- 数据存储全方案----详解持久化技术
- The classification of inter-process communication (IPC) and the development of communication methods
猜你喜欢

DOM-DOM树,一个DOM树有三种类型的节点

CSAPP Data Lab

Detailed explanation of common methods of filtering matrix (array) elements in Matlab

ROS源代码阅读(1)

DOM树的遍历-----修改样式,选择元素,创建和删除节点

Future Trends in Vulnerability Management Programs

Detailed explanation of new features of ES advanced function syntax

正式发布丨VS Code 1.70

Js prototype and prototype chain and prototype inheritance

入职数字ic设计后的一些工作心得
随机推荐
自动生成数据库设计文档利器
The practice of alibaba data synchronization component canal
MySQL权限控制、分区表、快速复制表
TRCX: doping process analysis
YTU 2418: C语言习题 矩阵元素变换
sql 使用到where和groupby时建立索引结果为啥是这样,原理是什么?
gRPC闭包调度器
comp3331-9331-21t1-midterm复习
Inter-process communication method (2) Named pipe
八.数据的存储
What does the sanction of the mixer Tornado mean for the DeFi market?
OpenCV创始人:开源绝不能完全免费!
JS-DOM元素对象
Oops Framework模板项目新手引导
对加密世界的经济误解:现金是储蓄?稀缺性创造价值?
Mask RCNN 网络详解
21天学习挑战赛第一周总结
HPSO and multi-core LSSVM based network intrusion detection
comp3331-9331-22t1-midterm复习辅导-tutorial week 5
[idea error] Invalid target distribution: 17 solution reference