Skip to content

Commit ce4b544

Browse files
committed
update regx usage.
1 parent dccf9cf commit ce4b544

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bashrc/oneline_cmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ printf "%`tput cols`s" | tr ' ' '#'
118118
#install django use douban mirror.
119119
pip install django --index-url http://pypi.douban.com/simple
120120

121+
# (?=exp) pre match
122+
# (?!exp) pre not match
123+
# (?<=exp) post match
124+
# (?<!exp) post not match
125+
# regx (?<=<(\w+)>).*(?=<\/\1>) for html tag
126+
121127
# checks to [192.168.32.208]: host [32.208 xuebao] not found
122128
# match [xxx] and [xxx] content.
123129
grep -Po '(?<=\[)[^]]+'

0 commit comments

Comments
 (0)