Community Patterns

Community Library Entry

0

Regular Expression
Created·2017-10-13 17:47
Flavor·PCRE (Legacy)

/
--\X*?,[\ ]*?$
/
g
Open regex in editor

Description

Find commented SQL code columns ending with comma

 ++ -- max(case when promo_temp.ph_bus_unt = 'ZZZ'
 ++ --          then promo_temp.ph_prom_dt
 ++ --     end) lst_prom_dt1,
  max(case when promo_temp.ph_bus_unt = 'CCC'
           then promo_temp.ph_prom_dt
      end) lst_prom_dt2,
 ++ -- max(case when promo_temp.ph_bus_unt = 'XXX'
 ++ --           and promo_temp.ph_chnl_cd = 'A'
 ++ --          then promo_temp.ph_prom_dt
 ++ --     end) lst_prom_dt3,
Submitted by anonymous