O exemplo a seguir está todo em uma linha e tenho várias ocorrências desse mesmo tipo de coisa que quero corrigir. Estou tentando excluir os caminhos de arquivo repetidos. O primeiro caminho de arquivo em cada linha é único, mas cada um depois disso é seguido por"><img src="RepeatOfThePath" class="_2yuc _3-96" />
São apenas as partes entre "><img src="
e " class="_2yuc _3-96" />
que pretendo deletar (incluindo essas strings), mas sem executar o comando até o final da linha, pois é onde está a data (que deve permanecer no lugar).
ANTES:
User Two||User Two sent 8 photos. File locations: Messaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49450603_219138382307432_3277446984746663936_n_219138378974099.jpgLnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49764923_358739138271625_580785213139845120_n_358739134938292.jpg"><img src="messages/inbox/UserOne_iW_GxLYs3A/photos/49764923_358739138271625_580785213139845120_n_358739134938292.jpg" class="_2yuc _3-96" />LnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/48404864_921427388047408_7300876900581244928_n_921427381380742.jpg"><img src="messages/inbox/UserOne_iW_GxLYs3A/photos/48404864_921427388047408_7300876900581244928_n_921427381380742.jpg" class="_2yuc _3-96" />LnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49164579_214366476179977_4468743459502555136_n_214366469513311.jpg"><img src="messages/inbox/UserOne_iW_GxLYs3A/photos/49164579_214366476179977_4468743459502555136_n_214366469513311.jpg" class="_2yuc _3-96" />LnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49787371_2255721791336152_3381788336120135680_n_2255721784669486.jpg"><img src="messages/inbox/UserOne_iW_GxLYs3A/photos/49787371_2255721791336152_3381788336120135680_n_2255721784669486.jpg" class="_2yuc _3-96" />LnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/48985330_811888555823956_4821470710998237184_n_811888549157290.jpg"><img src="messages/inbox/UserOne_iW_GxLYs3A/photos/48985330_811888555823956_4821470710998237184_n_811888549157290.jpg" class="_2yuc _3-96" />LnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49658202_599404630515667_5325374562135703552_n_599404627182334.jpg"><img src="messages/inbox/UserOne_iW_GxLYs3A/photos/49658202_599404630515667_5325374562135703552_n_599404627182334.jpg" class="_2yuc _3-96" />LnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49021071_212456299699526_956147449091588096_n_212456293032860.jpg"><img src="messages/inbox/UserOne_iW_GxLYs3A/photos/49021071_212456299699526_956147449091588096_n_212456293032860.jpg" class="_2yuc _3-96" />||Dec 30, 2018, 10:29 AM
DEPOIS:
User Two||User Two sent 8 photos. File locations: Messaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49450603_219138382307432_3277446984746663936_n_219138378974099.jpgLnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49764923_358739138271625_580785213139845120_n_358739134938292.jpgLnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/48404864_921427388047408_7300876900581244928_n_921427381380742.jpgLnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49164579_214366476179977_4468743459502555136_n_214366469513311.jpgLnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49787371_2255721791336152_3381788336120135680_n_2255721784669486.jpgLnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/48985330_811888555823956_4821470710998237184_n_811888549157290.jpgLnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49658202_599404630515667_5325374562135703552_n_599404627182334.jpgLnBrkMessaging Archive/messages/inbox/UserOne_iW_GxLYs3A/photos/49021071_212456299699526_956147449091588096_n_212456293032860.jpg||Dec 30, 2018, 10:29 AM
O que devo fazer?
Responder1
- Ctrl+H
- Encontre o que:
"><img\h+.+?class="_2yuc _3-96" />
- Substituir com:
LEAVE EMPTY
- Desmarque Match case
- confira Envolver
- verifique expressão regular
- DESMARCAR
. matches newline
- Replace all
Explicação:
"><img # literally
\h+ # 1 or more horizontal spaces
.+? # 1 or more any character but newline
class="_2yuc _3-96" /> # literally
Captura de tela: