0

Everything found at the word |Agristats and beyond to the end of the line should be deleted.

I have tried a couple things which do not appear to working-- |Agristats.*$ and |Agristats*$. References I have consulted are-- SuperUser: remove-the-last-part-of-every-line-in-notepad and Notepad++ wildcard.

Need help solving this, please!

INPUT

0011  |86|19|SALVAGE EVIS WINGS            | 0000029| 0001423.11|Agristats new trial_200 (edited).xlsx|'2-17$'
0012  |86|19|EVIS SALVAGE - BONELESS BREAST|-0000019|-0001080.38|Agristats new trial_200 (edited).xlsx|'2-17$'
0013  |86|19|SALVAGE EVIS DARK MEAT        | 0000024| 0000859.95|Agristats new trial_200 (edited).xlsx|'2-17$'
0011  |86|19|SALVAGE EVIS WINGS            |-0000022|-0001687.17|Agristats new trial_200 (edited).xlsx|'2-24$'
0012  |86|19|EVIS SALVAGE - BONELESS BREAST| 0000000| 0000063.71|Agristats new trial_200 (edited).xlsx|'2-24$'
0013  |86|19|SALVAGE EVIS DARK MEAT        | 0000016| 0000956.60|Agristats new trial_200 (edited).xlsx|'2-24$'
0018  |88|19|SMALL FRONT HALF SALVAGE      | 0000045| 0003087.42|Agristats new trial_200 (edited).xlsx|'2-24$'
0227  |78|19|DISJOINTED WING W/O TIP (6377,|-0000019|-0035659.00|Agristats new trial_200 (edited).xlsx|'12-2$'
0438  |78|19|WIP BLSL FILET 3.5OZ - 8.75OZ |-0000019|-0035218.00|Agristats new trial_200 (edited).xlsx|'12-2$'
0611  |78|19|SLIT BL SL BREAST FILET      (|-0000019|-0036078.05|Agristats new trial_200 (edited).xlsx|'12-2$'
1525  |78|19|WOG 2.50-DN  14HD CW  BF      |-0000790|-0024238.08|Agristats new trial_200 (edited).xlsx|'12-2$'

OUTPUT (desired)

0011  |86|19|SALVAGE EVIS WINGS            | 0000029| 0001423.11
0012  |86|19|EVIS SALVAGE - BONELESS BREAST|-0000019|-0001080.38
0013  |86|19|SALVAGE EVIS DARK MEAT        | 0000024| 0000859.95
0011  |86|19|SALVAGE EVIS WINGS            |-0000022|-0001687.17
0012  |86|19|EVIS SALVAGE - BONELESS BREAST| 0000000| 0000063.71
0013  |86|19|SALVAGE EVIS DARK MEAT        | 0000016| 0000956.60
0018  |88|19|SMALL FRONT HALF SALVAGE      | 0000045| 0003087.42
0227  |78|19|DISJOINTED WING W/O TIP (6377,|-0000019|-0035659.00
0438  |78|19|WIP BLSL FILET 3.5OZ - 8.75OZ |-0000019|-0035218.00
0611  |78|19|SLIT BL SL BREAST FILET      (|-0000019|-0036078.05
1525  |78|19|WOG 2.50-DN  14HD CW  BF      |-0000790|-0024238.08

Replace Dialogue

I do not understand why the replace prompt says Replaced All: 1,223 occurrences were replaced, and yet the file looks exactly the same with not changes made.

enter image description here

SherlockSpreadsheets
  • 2,062
  • 3
  • 27
  • 47

1 Answers1

2

You need to escape the '|' in regex

Change it to \|Agristats.*$ and do a replace all.

The reason why you are getting a result 1223 occurences were replaced is also simply due to the fact that the regex you wrote is matching a postion. These are called zero length match.

karthick
  • 11,998
  • 6
  • 56
  • 88