Linux下的正则表达式(基础)
2024-10-10 15:23:57
grep -n 'the' text.txt
搜寻含有the的部分(n代表现实显示行号)
grep -vn 'the' text.txt
搜寻不含有the的部分(n代表现实显示行号)
grep -vn 't[ha]e' text.txt
搜寻含有the 或者 tae 的部分
grep -n '[^g]oo' text.txt
搜寻oo钱包不含有g的部分
grep -n '[a-z]oo' text.txt
搜寻含有小写字母的部分
grep -n'[^a-z]' text.txt
搜寻不含有小写字母的部分
grep -n '^the' text.txt
搜寻行首有the的部分
grep -n 'the$' text.txt
搜寻行尾有the的部分
grep -n 'go*' text.txt
搜寻g后面有1个以上o的部分
grep -n 'go\{2,5\}' text.txt
搜寻g后面有2到5个o的部分
最新文章
- VMware ubuntu中执行python文件的操作小结
- csipsimple 出现单通情况
- ERROR Cannot determine the location of the VS Common Tools Folder
- 第七课第六节,T语言流程语句( 版本5.0)
- imx6 lvds 代码分析
- Quartz集群原理及配置应用
- CentOS中查看系统资源占用情况的命令
- is not in the sudoers file.This incident will be reported
- java基础知识再学习--HashMap与ConcurrentHashMap的区别
- 3.21	采购订单导入MDS
- 计蒜客 NOIP模拟赛(3) D1T1火山喷发
- PEACHPIE 0.9.11 版本发布,可以上生产了
- C# - 设计模式目录
- K8S RBAC
- hadoop HA (no zkfc to stop) DFSZKFailoverController进程没有启动
- Python取整及保留小数小结
- [未解决:快速滑动collectionveiw请求数据崩溃]:unable to allocate 6553600 bytes for bitmap data
- 切片对象的demo
- consul服务发现和配置共享的软件,
- 《Population Based Training of Neural Networks》论文解读
热门文章
- [T]各种字符串Hash函数比较
- Hibernate学习笔记--映射配置文件详解
- 十六进制string转换UIColor -备用
- 超全超详细的HTTP状态码大全(推荐抓包工具HTTP Analyzer V6.5.3)
- VS2010 Command Prompt Error:Cannot determine the location of the VS Common Tools folder
- 【转】Win7与Ubuntu 14.04双系统修改启动项顺序
- cf492B Vanya and Lanterns
- PHP设计模式笔记九:装饰器模式 -- Rango韩老师 http://www.imooc.com/learn/236
- Android ActionBar应用实战,高仿微信主界面的设计
- 使用WinAPI全局热键注册和全局模拟按键