#sysadmin #Learn #Regex http://wiki.jikexueyuan.com/project/unix/regular-expressions.html
https://www.gnu.org/software/sed/manual/html_node/Regular-Expressions.html
http://bbs.chinaunix.net/thread-764395-1-1.html
https://www.jianshu.com/p/7935fdcb17d0
Stream EDitor 使用
AWK 文字处理语言使用
https://en.wikipedia.org/wiki/AWK
https://blog.csdn.net/langwenjing/article/details/8174255
https://www.gnu.org/software/sed/manual/html_node/Regular-Expressions.html
http://bbs.chinaunix.net/thread-764395-1-1.html
https://www.jianshu.com/p/7935fdcb17d0
Stream EDitor 使用
AWK 文字处理语言使用
https://en.wikipedia.org/wiki/AWK
https://blog.csdn.net/langwenjing/article/details/8174255
www.gnu.org
Regular Expressions - sed, a stream editor
Next: Common Commands, Previous: Addresses, Up: sed Programs
#Firefox #Mozilla #Haha 顺便科普一下 #Regex 来表述 『(只要)带一个英文冒号并且(冒号)前面是纯英文』的 URL(URI) 模式就是这样:
比如
这次我们直接上 Perl & PCRE 了(因为 Perl 就是做这个的,AWK 懒得用)。
grep --perl-regexp '\s*\S+\:.*'也即(其实是一个... 呃,方便不会正则的人看,虽然我觉得不会有人不会正则)
SequenceOf如果用 『后行否定断言』
InSet(Spaces).repeatAnyTimes()
NotInSet(Spaces).repeatForAtLeastOneTime()
Character(':')
InSet(All).repeatAnyTimes()
比如
scheme:hierarchical-part
这个的 :
只有在 scheme 这个 [A-Za-z]+
(假设我们只允许『常见的』ALPHABETS 集合)后面才匹配这次我们直接上 Perl & PCRE 了(因为 Perl 就是做这个的,AWK 懒得用)。
perl -e 'while ($ln = <STDIN>) { print ($ln =~ m/(?<=[A-Za-z]):.*/) }'如果用具名组匹配(大家熟悉并且喜欢的 ECMAScript):
TODO()
Wikipedia
Perl Compatible Regular Expressions
software library for interpreting regular expressions
#regex 其实蛮好学的啊?只要记下 ^$+*|?[]{}\ 几个元字符就好很多了,很符合直觉很有用 推荐 Regex tutorial
www.regular-expressions.info
Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns
At Regular-Expressions.info you will find a wide range of in-depth information about a powerful search pattern language called regular expressions.
#Python #DontKnow #parsing #regex
https://frostming.com/2020/05-12/python-magic-method/
没想到 py 的元方法解析是要 type(obj) 上有才能 next(obj) 这种,基于getattr调用拦截的就不行
https://frostming.com/2018/02-06/python-hidden-regexp/
多项任一(a|b)正则表达式匹配 sre_parse scanner 工具,可惜本身没做 groups 编号兼容的支持
https://frostming.com/2020/05-12/python-magic-method/
没想到 py 的元方法解析是要 type(obj) 上有才能 next(obj) 这种,基于getattr调用拦截的就不行
https://frostming.com/2018/02-06/python-hidden-regexp/
多项任一(a|b)正则表达式匹配 sre_parse scanner 工具,可惜本身没做 groups 编号兼容的支持
#parsing #Python #regex #dontknow 感觉有一定价值,但一般 Kotlin,Py,JS 里都有 raw string 能解决转义符冲突
https://tttttt.me/py_zh_real/13697
https://tttttt.me/py_zh_real/13697
Telegram
eW91dHUuYmUvZFF3NHc5V2dYY1EK in Python 交流群
\.换成[.]可读性更高