一 定义
正则表达式拾用于描述字符排列和匹配模式的一种语法规则。
它主要用于字符串的模式分割、查找、匹配以及替换操作。
 
二 shell编程之正则表达式与通配符区别

正则表达式概念篇
 
 
三 通配符
*:匹配任意内容
?:匹配任意一个内容
[]:匹配中括号中的一个字符
[[email protected] ~]# touch cangls
[[email protected] ~]# touch canyls
[[email protected] ~]# ls can?ls
cangls canyls
[[email protected] ~]# ls can*
cangls canyls
[[email protected] ~]# ls can[gy]ls
cangls canyls
 
 
 
 

分类:

技术点:

相关文章: