首页 > 其他分享 >grep - Meta Characters

grep - Meta Characters

时间:2023-08-04 13:55:13浏览次数:39  
标签:grep item matches preceding times indicates Meta Characters matched

Meta Characters and the grep Command
The fundamental building blocks are the regular expressions that match a single character. Most characters, including all letters and digits, are regular expressions that match themselves. Any meta-character with special meaning may be quoted by preceding it with a backslash.
A regular expression may be followed by one of several repetition operators, as shown here:
" . " matches any single character.
" ? " indicates that the preceding item is optional and will be matched at most once: Z? matches Z or ZZ.
" * " indicates that the preceding item will be matched zero or more times: Z* matches Z, ZZ, ZZZ, and so forth.
" + " indicates that the preceding item will be matched one or more times: Z+ matches ZZ, ZZZ, and so forth.
" {n} " indicates that the preceding item is matched exactly n times: Z{3} matches ZZZ.
" {n,} " indicates that the preceding item is matched n or more times: Z{3} matches ZZZ, ZZZZ, and so forth.
" {,m} " indicates that the preceding item is matched at most m times: Z{,3} matches Z, ZZ, and ZZZ.
" {n,m} " indicates that the preceding item is matched at least n times, but not more than m times: Z{2,4} matches ZZ, ZZZ, and ZZZZ.
The empty regular expression matches the empty string (i.e., a line in the input stream with no data). Two regular expressions may be joined by the infix operator (|). When used in this manner, the infix operator behaves exactly like a logical “OR” statement, which directs the grep command to return any line that matches either regular expression.

标签:grep,item,matches,preceding,times,indicates,Meta,Characters,matched
From: https://www.cnblogs.com/zhangzhihui/p/17605724.html

相关文章

  • apollo.configService 和 apollo.meta 的区别
    https://www.apolloconfig.com/#/zh/usage/java-sdk-user-guide 1.2.2.2跳过ApolloMetaServer服务发现适用于apollo-client0.11.0及以上版本一般情况下都建议使用Apollo的MetaServer机制来实现ConfigService的服务发现,从而可以实现ConfigService的高可用。不过apoll......
  • grep 中的正则流派
    简单记录下,使用grep时所用的正则的问题。 简单来说,正则分为两个流派POSIX  和 PCRE。Linux上的工具的正则大多是基于POSIX(Unix通用规范)的,其中又分为BRE(基础版)和ERE(进阶版)grep,使用POSIX的基础版正则。。。 但(){} 都需要转义为\( \) \{ \}并......
  • HTML | meta元信息
    HTML<meta>元素表示那些不能由其他HTML元相关(meta-related)元素表示的元数据信息。如:<base>、<link>、<script>、<style>或<title>。配置字符编码<metacharset="utf-8">针对IE浏览器的兼容性配置。<metahttp-equiv="X-UA-Compatible"con......
  • egrep
    egrep在文件内查找指定的字符串补充说明egrep命令用于在文件内查找指定的字符串。egrep执行效果与grep-E相似,使用的语法及参数可参照grep指令,与grep的不同点在于解读字符串的方法。egrep是用extendedregularexpression语法来解读的,而grep则用basicregularexpression语法......
  • grep
    grep强大的文本搜索工具补充说明grep(globalsearchregularexpression(RE)andprintouttheline,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来。用于过滤/搜索的特定字符。可使用正则表达式能配合多种命令使......
  • grep
    1.获取文件中的关键字key:catfileName|grep"key"2.获取文件中的某个关键字key1,key2,key3:catfileName|grep-E"key1|key2|key3"3.获取文件中的多个关键字,同时满足:catfileName|grepkey1|grepkey2|grepkey34.忽略文件中的某个关键字,需要转义......
  • SAP Fiori Elements 应用 metadata.xml 解析成的 JSON 对象
    在这个文件设置断点: AnnotationParser._parserData.metadataProperties=AnnotationParser.getAllPropertiesMetadata(AnnotationParser._parserData.serviceMetadata); if(AnnotationParser._parserData.metadataProperties.extensions){ mappingList.propertyExtensi......
  • Meta-Transformer 多模态学习的统一框架
    Meta-Transformer是一个用于多模态学习的新框架,用来处理和关联来自多种模态的信息,如自然语言、图像、点云、音频、视频、时间序列和表格数据,虽然各种数据之间存在固有的差距,但是Meta-Transformer利用冻结编码器从共享标记空间的输入数据中提取高级语义特征,不需要配对的多模态训练......
  • 灵雀云Alauda MLOps 现已支持 Meta LLaMA 2 全系列模型
    在人工智能和机器学习领域,语言模型的发展一直是企业关注的焦点。然而,由于硬件成本和资源需求的挑战,许多企业在应用大模型时仍然面临着一定的困难。为了帮助企业更好地应对上述挑战,灵雀云于近日宣布,企业可通过AlaudaMLOps(以下简称AML)使用由Meta开发的 LLaMA 2全系列模型。 ......
  • 通过meta控制路由显示与隐藏
    routes:[    {      path:"/home",      component:Home,      meta:{        show:true      }    },    {      path:"/login",      component:......