一 定义
正则表达式拾用于描述字符排列和匹配模式的一种语法规则。
它主要用于字符串的模式分割、查找、匹配以及替换操作。
 
二 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
 
 
 
 

相关文章:

  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2021-08-22
  • 2021-09-07
  • 2022-12-23
  • 2021-10-03
猜你喜欢
  • 2022-12-23
  • 2021-11-20
  • 2021-06-08
  • 2021-09-06
  • 2021-09-19
  • 2021-12-13
相关资源
相似解决方案