_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › RegularExpressions
|
|
.Net 蠍一朱 .
test
[edit]
1 T-SQL 譯殊 #--谿瑚: https://www.regextester.com/94246
https://regexr.com/4cgnu --[^\r\n]*|/\*[\s\S]*?\*\/ (\/\*([^*]|[\r\n]|(\*+([^\*\/]|[\r\n])))*\*+\/)|(\/\/.*)|(\-\-(.*)[\r\n])|((.*)\*\/) create function dbo.remove_comment(@definition nvarchar(max)) returns nvarchar(max) begin declare @start int = 0 , @next_start int , @end int while(1=1) begin set @end = charindex('*/', @definition) if @end = 0 break set @start = 0 while(1=1) begin set @start = charindex('/*', @definition, @start+1) set @next_start = charindex('/*', @definition, @start+1) if @next_start > @end or @next_start = 0 break end set @definition = stuff(@definition, @start, @end-@start+2, '') --select @definition --print concat('@start=', @start, ', @end=', @end) if @start = 0 break end return dw.dbo.rxreplace(@definition, '--[^\r\n]*', '', 1) end [edit]
3 蠏語 覓語 觸願鍵 #ろ
<PackageName>aaa.dtsx</PackageName> <PackageName>aaa.txt</PackageName> <PackageName>aaa.dtsx <PackageName>aaa.dtsx</aaaPackageName> <html>aaaa bbb </html> 蠏
(?<=\<PackageName\>)[\w./]+\.dtsx(?=\<\/PackageName\>) 蟆郁骸
aaa.dtsx るジ
ろ <Cars> <Car id="1234"> <Make>Volkswagen</Make> <Model>Eurovan</Model> <Year>2003</Year> <Color>White</Color> </Car> <Car id="5678"> <Make>Honda</Make> <Model>CRV</Model> <Year>2009</Year> <Color>Black</Color> <Mileage>35,600</Mileage> </Car> </Cars> 蠏
<Car[\n\s\S]*?</Car> 蟆郁骸
<Cars> <Car id="1234"> <Make>Volkswagen</Make> <Model>Eurovan</Model> <Year>2003</Year> <Color>White</Color> </Car> <Car id="5678"> <Make>Honda</Make> <Model>CRV</Model> <Year>2009</Year> <Color>Black</Color> <Mileage>35,600</Mileage> </Car> [edit]
4 蠏語 觸願鍵 #ろ
<html><img src="kk.gif" alt="text"/></html> <html><img src='kk.gif' alt="text"/></html> <html><img src = "kk.gif" alt="text"/></html> 蠏
<img[^>]+src\s*=\s*['"]([^'"]+)['"][^>]*> 蟆郁骸
<img src="kk.gif" alt="text"/> <img src='kk.gif' alt="text"/> <img src = "kk.gif" alt="text"/> [edit]
5 SQL ろ襴渚語 insert 企 谿剰鍵 #text
insert into [dw].[fact].[conn_users] insert into [Fact].conn_users insert into Fact.conn_users insert into fact.conn_users insert into dw.fact.conn_users insert into [dw].fact.[conn_users] insert into [dw].fact.[Conn users] insert into fact.conn_users insert fact.conn_users(cola, colb) update fact.conn_users insert dim.code(cola, colb) 蠏
願唄 結血 襾麹.. (?<=insert(\s+into\s+|\s+))((\[|)\w+(\]|)|(\[|)\w+(\]|)|)(\.|)(\[|)(?i)fact(\]|)\.(\w+|\[[^\]]*]) (?<=insert(\s+into\s+|\s+))(\[\w+\]\.|\w+\.|)(\[|)(?i)(temp|fact|dim|etl|realtime|bill|dbo)(\]|)\.(\w+|\[[^\]]*]) 蟆郁骸
[dw].[fact].[conn_users] [Fact].conn_users Fact.conn_users fact.conn_users dw.fact.conn_users [dw].fact.[conn_users] [dw].fact.[Conn users] fact.conn_users fact.conn_users [edit]
6 ろる.企 #select * from dw.fact.tablex a inner join Dim.tabley b on a.id = b.id inner join [fact].tablec c on a.id = c.id select * from dw.etl.tablex a inner join realtime.tabley b on a.id = b.id inner join dbo.tablec c on a.id = c.id inner join bill.tablec d on a.id = d.id (\w+\.|)(\[|)(?i)(fact|dim|etl|realtime|bill|dbo)(\]|)\.\w+ 蟆郁骸
dw.fact.tablex Dim.tabley [fact].tablec dw.etl.tablex realtime.tabley dbo.tablec bill.tablec るジ
ろ
insert into [dw].[fact].[conn_users] insert into [Fact].conn_users insert into Fact.conn_users insert into fact.conn_users insert into dw.fact.conn_users insert into [dw].fact.[conn_users] insert into [dw].fact.[conn users] insert into fact.conn_users insert fact.conn_users(cola, colb) update fact.conn_users insert dim.code(cola, colb) 蠏
(\[\w+\]\.|\w+\.|)(\[|)(?i)(temp|fact|dim|etl|realtime|bill|dbo)(\]|)\.(\w+|\[[^\]]*]) 蟆郁骸
dw.fact.aaaa dw.[fact].aaaa fact.aaaa fact.[aaaa] Fact.AAAA [fact].[aaaa bbb] dw.[fact].[aaaa bbb] [dw].[fact].[aaaa bbb] [edit]
11 覃覓語 #$()*+.?[\^{| escape 覓語
text <- "abcd $efg hig" pattern <- "\\$efg" unlist(regmatches(text, regexec(pattern, text))) > unlist(regmatches(text, regexec(pattern, text))) [1] "$efg" 譬襭蟯(]), 危(-), 譬襭譴蟯(}) 覃 覓語 觜語. 譬襭蟯(]), 危(-) 伎れ危 豌襴讌 蟯([) れ 蟆曙一襷 覃 覓語襦 語覃, 譬襭譴蟯(}) 伎れ 豌襴讌 譴蟯({) れ 蟆曙一襷 覃覓語襦 語. 譬襭 蟯 ),},] 伎れ危 豌襴 殊 覃覓語襦 覿襯讌 .
鏤
|
願 覦襦 螳企. 螻 襦 企螻 襷 蠍 襴 螳 螳 磯 10 蟇碁Π. (A. 豺企) |