欢迎您访问南华自考网!

emacs org,查询emp表中ename以a或c开头的人员信息

更新时间:2023-11-07 20:05:34作者:51data

首先是特殊的Metacharacter:

. * +   ^ $ \ [ 

emacs org,查询emp表中ename以a或c开头的人员信息

注意的一点,emacs的regex可以直接用 ` ` 与 `+`.

而在 `[]` 之内 这 `] - ^` 三个是特殊字符。

 . any character (but newline)  * previous character or group, repeated 0 or more time  + previous character or group, repeated 1 or more time    previous character or group, repeated 0 or 1 time  ^ start of line  $ end of line  [...]    any character between brackets  [^..]    any character not in the brackets  [a-z]    any character between a and z  \ prevents interpretation of following special char  \|or  \wword constituent  \bword boundary  \sc      character with c syntax (e.g. \s- for whitespace char)  \( \)    start/end of group  \< \>    start/end of word (faulty rendering: backslash + less-than and backslash + greater-than)  \_< \_>  start/end of symbol  \` \'    start/end of buffer/string  \1string matched by the first group  \nstring matched by the nth group  \{3\}    previous character or group, repeated 3 times  \{3,\}   previous character or group, repeated 3 or more times  \{3,6\}  previous character or group, repeated 3 to 6 times  \=match succeeds if it is located at point

此处要注意的是,有 or 的操作,但是要 escape 掉。

其中 * , + , and are non-greedy versions of *, +, and

另外列出语义化的semantic classes:

  [:digit:]  a digit, same as [0-9]  [:alpha:]  a letter (an alphabetic character)  [:alnum:]  a letter or a digit (an alphanumeric character)  [:upper:]  a letter in uppercase  [:lower:]  a letter in lowercase  [:graph:]  a visible character  [:print:]  a visible character plus the space character  [:space:]  a whitespace character, as defined by the syntax table, but typically [ \t\r\n\v\f], which includes the newline character  [:blank:]  a space or tab character  [:xdigit:] an hexadecimal digit  [:cntrl:]  a control character  [:ascii:]  an ascii character  [:nonascii:]  any non ascii character

然后是 syntax classes:

  \s-   whitespace character \s/   character quote character  \sw   word constituent     \s$   paired delimiter    \s_   symbol constituent   \s'   expression prefix   \s.   punctuation character\s<   comment starter     \s(   open delimiter character    \s>   comment ender\s)   close delimiter character   \s!   generic comment delimiter  \s"   string quote character      \s|   generic string delimiter   \s\   escape character     

当然,这些平常也用不大着。

最后是常用的emacs-commands:

 C-M-s     incremental forward search matching regexp C-M-r     incremental backward search matching regexp  replace-regexp   replace string matching regexp query-replace-regexp    same, but query before each replacement align-regexp     align, using strings matching regexp as delimiters highlight-regexp highlight strings matching regexp occur     show lines containing a match multi-occur      show lines in all buffers containing a match how-many  count the number of strings matching regexp keep-linesdelete all lines except those containing matches flush-lines      delete lines containing matches grep      call unix grep command and put result in a buffer lgrep     user-friendly interface to the grep command rgrep     recursive grep dired-do-copy-regexp    copy files with names matching regexp dired-do-rename-regexp  rename files matching regexp  find-grep-dired  display files containing matches for regexp with Dired

版权声明:本文基于CC协议,以分享为目的,转载于今日头条,版权归原作者,如侵权请联系我们删除,内容仅供参考,不代表本站建议!

相关文章

为您推荐

2022年天津外国语大学考研真题公布(附历年考研真题下载)

2022年天津外国语大学考研真题公布(附历年考研真题下载)天津外国语大学2022年硕士研究生入学考试部分样题:http://grad.tjfsu.edu.cn/info/1019/3137.htm附件【天津外国语大学2022年硕士研究生入学

2023-11-01 13:15

河南师范大学考研真题(2013(2019年)下载)

河南师范大学考研真题(2013(2019年)下载)2022考研备考时,历年河南师范大学考研真题是广大考研学子十分关心的问题,毕竟专业课基本是招生单位自主命题,做院校真题是必不可少的一步,以下是为大家整理的2013-2019年河南师范大学考研

2023-11-01 13:15

2022年北京城市学院考研真题公布(附历年考研真题下载)

2022年北京城市学院考研真题公布(附历年考研真题下载)2022年硕士研究生入学考试初试专业课试题参考考试科目代码考试科目名称点击下载331社会工作原理北京城市学院2022年《社会工作原理》入学试题.pdf437社会工作实务北京城市学院20

2023-11-01 13:15

浙江工商大学考研真题(2018(2022年年)下载)

浙江工商大学考研真题(2018(2022年年)下载)2022考研备考时,历年浙江工商大学考研真题是广大考研学子十分关心的问题,毕竟专业课基本是招生单位自主命题,做院校真题是必不可少的一步,以下是为大家整理的2018-2021年浙江工商大学考

2023-11-01 10:58

2022年深圳北理莫斯科大学考研真题公布(附历年考研真题下载)

2022年深圳北理莫斯科大学考研真题公布(附历年考研真题下载)2022年硕士研究生各招生专业考试大纲及测试样题应用数学与信息技术测试样题基础材料学测试样题纳米生物技术测试样题地球生态变迁与人工干预系统测试样题国际经济与商业测试样题俄罗斯语言

2023-11-01 10:58

2022年重庆邮电大学考研真题公布(附历年考研真题下载)

2022年重庆邮电大学考研真题公布(附历年考研真题下载)2022年硕士研究生入学考试试题(在各招生学院硕士研究生招生报考指南中):http://yjs.cqupt.edu.cn/info/1180/4083.htm2021年硕士研究生初试科

2023-11-01 10:58

加载中...