"Open Source" is a good mechanism to develop programs. apple is my favorite food. Football game is not use feet only. this dress doesn't fit me. However, this dress is about \$ 3183 dollars. GNU is free air not free beer. Her hair is very beauty. I can't finish the test. Oh! The soup taste good. motorcycle is cheap than car. This window is clear. the symbol '\*' is represented as start. Oh!My god! The gd software is a library for drafting programs. You are the best is mean you are the no. 1. The world <Happy> is the same with "glad". I like dog. google is the best tools for search keyword. goooooogle yes! go! go! Let's go.
# I am VBird
使用特殊符号查找小写字母:
1
grep -n '[[:lower:]]' regular_express.txt
红色为匹配成功的字符
使用特殊符号查找数字:
1
grep -n '[[:digit:]]' regular_express.txt
语系对正则表达式的影响
我们知道,计算机可以直接处理的文件中只有 0 和 1,我们看到的字符文字和数字都是通过编码表转换而来的。不同语系的编码不同会导致不同语系的数据选取结果有所差异。 以英文大小写为例,zh_CN.big5 及 C 这两种语系差异如下:
LANG=C 时: 0 1 2 3 4….A B C D E…Z a b c d e…z
LANG=zh_CN.big5 时:0 1 2 3 4…a A b B c C d D…..z Z
在使用正则表达式[A-Z]时, LANG=C 的情况下,找到的是大写字符 A B C D…Z。而在 LANG=zh_CN.big5 的情况下,会选取到 A b B c C d D…z Z。所以在使用正则表达式时要特别留意语系。