Regex
2016-05-13 14:34
369 查看
1. regex with variable
example: find the number and put a parenthese around the number.
output:
a(5265)b
example: find the number and put a parenthese around the number.
output:
a(5265)b
String field = "a5265b"; String result = field.replaceAll("(\\d+)", "($1)");
相关文章推荐
- redis常用命令与使用配置
- 同步、异步、多线程
- 详解URL的组成
- NYOJ 269 VF (在1到10^9范围内找各个位数相加等于S的种数)
- 腾讯云通过首批大数据认证
- Linux kernel源码阅读笔记1-CONFIG_SMP
- Python3 将configparser从ini文件中读取的内容转换成字典格式
- wireshark过滤数据
- FreeSWITCH第三方库(视频)的简单介绍(二)
- spring 页面传参List到controller
- shell-4.shell双引号,单引号,反引号,反斜杠
- 机器学习 -- 最小二乘法与梯度下降法
- Java中 运算符 与(&)、非(~)、或(|)、异或(^)
- string类封装
- Windows操作系统下给文件夹右键命令菜单添加启动命令行的选项
- Comparable与Comparator浅析
- 使用WebRTC搭建前端视频聊天室——信令篇
- 第三方登录 分享
- leetcode记录 171. Excel Sheet Column Number
- Java并发编程:线程、进程的创建