cat test2.html | sed -e 's/\(^\|[^0-9]\)\(13[0-9][0-9]\{8\}\|14[579][0-9]\{8\}\|15[0-3,5-9][0-9]\{8\}\|16[6][0-9]\{8\}\|17[0135678][0-9]\{8\}\|18[0-9][0-9]\{8\}\|19[89][0-9]\{8\}\)\($\|[^0-9]\)/\nfind_phone:\2\n/g' | sed -e 's/\(^\|[^0-9]\)\([0-9]\{6…
import sys import re #Make sure we have a single URL argument. if len(sys.argv) != 2: print (sys.stderr, "URL Required") sys.exit(-1) #Easie access. url = sys.argv[1] #Ensure we were passed a somewhat valid URL. #This is a superficial test. if r…
匹配中文字符: let reg=/([\u4E00-\u9FFF]+)/; //\u代表Unicode编码 匹配电话号码: let reg=/^1[34578]\d{9}$/; 给每三位数字添加一个逗号: let reg=/(?=(\B(\w{3})*)$)/g; let str='10000000'; str.replace(reg,','); 字符串去重: let reg=/(\w)\1+/g; let str='aaabbbcccddd'; console.log(str.replace(…
//将正规式转变成NFApackage hjzgg.formal_ceremony_to_dfa; import java.util.ArrayList; class Edge{ public int u, v; public char key; public Edge(int u, int v, char key) { super(); this.u = u; this.v = v; this.key = key; } @Override public String toString() {…
问题描述 比如table1中有两条记录 name no a 2,9 b 8,10 然后有一串字符串,是0,1,2,3,4 然后通过一条sql,找出no为2,9的记录来``` 因为字符串中有2,数据中也有2 详细解释 ------------------------------ 表的字段就是 name no a 2,9 b 8,10 字符串是str="0,1,2,3,4" 接下来就是查 no字段里跟str里有交集的记录 查询的结果就是nam…