亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

有正則高手嗎? 幫忙解決一下這個問題

有正則高手嗎? 幫忙解決一下這個問題

慕碼人2483693 2018-12-19 15:15:48
現在有一條sql語句select ID as id,Name as name,IP as ip,lat,lon,0 as type from trk.devs_v2 where type=0 union all select id,signalName as name,ip ,lat,lng as lon,99 as type from yc_signal.signal union all想使用正則讓最后一個union all去掉 而不是去掉所有的union all想要的結果為select ID as id,Name as name,IP as ip,lat,lon,0 as type from trk.devs_v2 where type=0 union all select id,signalName as name,ip,lat,lng as lon,99 as type from yc_signal.signal有正則大神幫幫忙唄! 萬分感謝
查看完整描述

1 回答

?
幕布斯6054654

TA貢獻1876條經驗 獲得超7個贊

let str = "union albdfdfdfunion alaadunion al";
let reg = str.replace(/(union al)$/,'');
console.log(reg)

查看完整回答
反對 回復 2019-01-01
  • 1 回答
  • 0 關注
  • 455 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號