scala代码块 截取以某个字符开头,以某个字符结尾的字符串 def main(args: Array[String]): Unit = { val s = "{{a61,a2,a3},{b1,b2,b3},{c1m,.,kkl,c2,c3}}" val reg = Pattern.compile("\\{(\\w+?),") val matcher = reg.matcher(s) while (matcher.find()) { println(matcher.
select id,name, concat('tel:',phone) from user order by time INTO outfile 'user.txt' FIELDS terminated by '\,';字段以逗号分隔,导出的user.txt文件在数据库目录下 导出结果到sqlselect * from user into outfile '/home/db.sql'; 字段之间的分隔字符,转义字符,包括字符,及记录行分隔字符.列在下面: FIELDS TERMINATED B
下面的例子是在文件的指定位置增加指定字符串的例子 修改配置文件: def add_str(pre_str): lines = [] flag = True f = open("z.txt") for line in f: lines.append(line) if line.strip("\n ") == "</se.diabol.jenkins.pipeline.DeliveryPipelineView>" and flag: li