本文转自:91博客 :原文地址:http://www.9191boke.com/235792704.html 正则表达式或“regex”用于匹配字符串的各个部分,下面是我创建正则表达式的备忘录.包括一些常用的验证.匹配数字.匹配字符串.匹配中文.匹配任意字符串. 匹配正则 使用 .test() 方法 let testString = "My test string"; let testRegex = /string/; testRegex.test(testString); 匹配多个模
VIM 用正则表达式 批量替换文本,多行删除,复制,移动 在VIM中 用正则表达式 批量替换文本,多行删除,复制,移动 :n1,n2 m n3 移动n1-n2行(包括n1,n2)到n3行之下: :n1,n2 co n3 复制n1-n2行(包括n1,n2)到n3行之下: :n1,n2 d 删除n1-n2行(包括n1,n2)行: vi替换使用规则: :g/s1/s/s2/s3/g 第一个g表示对每一个包括s1的行都进行替换,第二个g表示对每一行包括s1的行所有的s2都用s
删除df中任意字段等于'null'字符串的行: df=df.astype(str)#把df所有元素转为str类型 df=df[df['A'].isin(['null','NULL'])] #找出df的'A'列值为'null'或'NULL'(注意此处的null是字符串,不是空值) df=df[~df['A'].isin(['null','NULL'])] #过滤掉A列为'null'或'NULL'的行,~表示取反 去掉任意一列为'null'值的行,目前只能想到用循环: for col in list
https://www.postgresql.org/docs/9.6/static/functions-json.html PostgreSQL 9.6.1 Documentation Prev Up Chapter 9. Functions and Operators Next 9.15. JSON Functions and Operators Table 9-42 shows the operators that are available for use with the two JS