我正在寻找一些帮助来创建正则表达式/宏,以在记事本++中执行以下操作:
非常感谢您!
以下是要搜索的内容:
2 604 BOD9A SvcAcct_OP 2019-03-20 15:36:51 2019-03-20 17:10:43 >60 3vynfaux5x7f6 8 43,028,307 21,477,582
1 1423 BOD9A SvcAcct_OP 2019-03-20 15:27:02 2019-03-20 15:45:17 >120 d943r2yqhrmxb 8 23,474,241 11,727,495
2 285 BOD9A SvcAcct_OP 2019-03-20 15:59:39 2019-03-20 17:11:09 >60 2akbrbykkfra8 8 19,728,513 9,685,044
1 1648 BOD9A SvcAcct_OP 2019-03-20 16:02:48 2019-03-20 17:11:12 >60 268g625syz3cu 8 15,220,260 5,812,065
2 537 BOD9A SvcAcct_OP 2019-03-20 15:49:42 2019-03-20 17:11:05 >60 ftgd185xum5jv 8 9,626,463 11,167,992
<many lines>
02v7k06k2zux6 insert into PRMTR_VAL_TXT AS Twin, PRCS_ID AS AppCode, SUBPRCS_ID AS SubAppCode, MAX_PRCS_TS AS ProcDate from (SELECT DISTINCT <very long SQL ~ 5000 chars>
1dmr7327m1sr6 SELECT /*+dynamic_sampling(11)*/ DISTINCT to_char()<very long SQL ~ 5000 chars>
203j3m9tkngyv select distinct decode(s.sql_id , null, s.prev_sql_id, s.sql_id ) as sql_id, t.piece, t.sql_text from gn s, gtex t t where decode(s.sql_id , null, s.prev_sql_id, s.sql_id) = t .sql_id and s.username <> ' ' and s.username <> 'BKU CTRL' and s.username <> 'DBSNMP' and s.username <> 'SYS' and s.sid not in (select sid from ion where qcsid! =sid) order by 1, 2
3vynfaux5x7f6 SELECT TB_TB_NAME_LINE<very long SQL ~ 5000 chars> /* [TT][U]:'user1'[/U][D]:' report1'[/D][Q]:'BODW9A':'Query 1' :'DPUNI VERS'[/Q][S] datalayer1 [/S][A]'BOB'[/A][/ TT] */
268g625syz3cu SELECT TB_NAME_LINE<very long SQL ~ 5000 chars> /* [TT][U]:'user2'[/U][D]:' report2'[/D][Q]:'BODW9A':'Query 1' :'DPUNI VERS'[/Q][S] datalayer2 [/S][A]'BOB'[/A][/ TT] */
29bdpm894vydq declare Lines sys.dbms_output.chararr; begin :NumLines := 10 ; sys.dbms_output.get_lines(lines => Lines, numlines => :NumLi nes); if :NumLines > 0 then :Line0 := Lines(1); end if; if : NumLines > 1 then :Line1 := Lines(2); end if; if :NumLines > 2 then :Line2 := Lines(3); end if; if :NumLines > 3 then :Line3 := Lines(4); end if; if :NumLines > 4 then :Line4 := Lines(5) ; end if; if :NumLines > 5 then :Line5 := Lines(6); end if; if :NumLines > 6 then :Line6 := Lines(7); end if; if :NumLines > 7 then :Line7 := Lines(8); end if; if :NumLines > 8 then :L ine8 := Lines(9); end if; if :NumLines > 9 then :Line9 := Line s(10); end if; end;
2abw7qg0jz5mx SELECT TB_CHH_ NBR<very long SQL ~ 5000 chars> /* [TT][U]:'user3'[/U][S]datalayer3[/S][A]' BOBJ'[/A][/TT] */
2akbrbykkfra8 SELECT TB_D_NAME_LINE<very long SQL ~ 5000 chars> /* [TT][U]:'user4'[/U][D]:' report4'[/D][Q]:'TWIN9A':'Query 1' :'DPUNI VERS'[/Q][S] datalayer4 [/S][A]'BOB'[/A][/ TT] */
2ba11aarc5r8r SELECT substr(TE_TXT<very long SQL ~ 5000 chars> /* [TT][U]:'user5'[/U][D]:'report5'[/D][Q]:'TWIN9 A':'Query 1 with DepMthy' :'DPUNIVERS'[/Q][S]datalayer5[/S][A]'BOB'[/A][/TT] */
这是第一部分的最终输出:
2 604 BOD9A SvcAcct_OP 2019-03-20 15:36:51 2019-03-20 17:10:43 >60 3vynfaux5x7f6 8 43,028,307 21,477,582 user1 report1 datalayer1
1 1423 BOD9A SvcAcct_OP 2019-03-20 15:27:02 2019-03-20 15:45:17 >120 d943r2yqhrmxb 8 23,474,241 11,727,495
2 285 BOD9A SvcAcct_OP 2019-03-20 15:59:39 2019-03-20 17:11:09 >60 2akbrbykkfra8 8 19,728,513 9,685,044 user4 report4 datalayer4
1 1648 BOD9A SvcAcct_OP 2019-03-20 16:02:48 2019-03-20 17:11:12 >60 268g625syz3cu 8 15,220,260 5,812,065 user2 report2 datalayer2
2 537 BOD9A SvcAcct_OP 2019-03-20 15:49:42 2019-03-20 17:11:05 >60 ftgd185xum5jv 8 9,626,463 11,167,992
答案 0 :(得分:0)
尝试一下:
搜索:
(\b([a-z0-9]{13})\b.*+)(?=[\s\S]+^\2.*\[U\]:?+'?+\s*([^[]+?)\s*'?\[\/U\].*\[D\]:?+'?+\s*([^[]+?)\s*'?\[\/D\].*\[S\]:?+'?+\s*([^[]+?)\s*'?\[\/S\])
替换为:
\1 \3 \4 \5
您有一个演示here。