zoukankan      html  css  js  c++  java
  • sql去除注释

    https://www.shangmayuan.com/a/39a8fba001d84c168f35488e.html

    该方法,能在保持原有代码的状况下,好比大小写,换行,缩进等信息,去除sql中的各类注释
    代码以下web

    Pattern p = Pattern.compile("(?ms)('(?:''|[^'])*')|--.*?$|/\*.*?\*/|#.*?$|");
    String presult = p.matcher(sql).replaceAll("$1");
    return presult;

    包括sql

    横杠注释ruby

      --drop table report.rpt_employee_fund_match;
    --create table report.rpt_employee_fund_match as 
    /*  insert into report.partner_open_account_stat_tmp
      -- where to_number(to_char(a.create_date,'YYYYMMDD'),'99999999') <= v_period_id
    */ -- delete by zak 20140623
    

    包括不去掉原有代码里面的注释,很是强大svg

    select employee_id, max(cast(organization_id as integer)) 
    organization_id 
    from src_ht_hr_ims.ims_rt_employee_organization where state=1
    and jobtitle <>'--' --and employee_id='50019940'
    group by employee_id                     
  • 相关阅读:
    poj 2155 B
    hdu 1556 A
    hdu 1556 A
    #366 A-C
    最长上升子序列
    Codeforces Div3 #501 A-E(2) F以后补
    字典的建立 查找
    字典序大小
    头文件模板
    01背包模板 及 优化
  • 原文地址:https://www.cnblogs.com/xuxm2007/p/15148462.html
Copyright © 2011-2022 走看看