Delete all on line AFTER specified text is found
Posted: Mon Jun 05, 2017 10:52 pm
Hello,
I'd like to clean up a weather page on a daily basis to go from this:
Billings, MT;93;62;80;53;Not as warm;NNE;10;44%;20%;8
Birmingham, AL;80;70;81;69;Thunderstorms;SSW;6;81%;90%;4
Bismarck, ND;92;57;92;63;Mostly sunny;SE;12;46%;36%;8
Boise, ID;85;51;77;49;Mostly sunny, nice;N;8;36%;0%;8
to this
Billings, MT;93;62;80;53;
Birmingham, AL;80;70;81;69;
Bismarck, ND;92;57;92;63;
Boise, ID;85;51;77;49;
I can find using \;\d+\;\d+\;\d+\;\d+\;
but I can't delete to the end of the line.
I tried adding \r\n to the end of the above like this: \;\d+\;\d+\;\d+\;\d+\;\r\n
but that replace all my City information with the actual regex code.
Any ideas? I feel like i'm missing something very simple....
thanks!
I'd like to clean up a weather page on a daily basis to go from this:
Billings, MT;93;62;80;53;Not as warm;NNE;10;44%;20%;8
Birmingham, AL;80;70;81;69;Thunderstorms;SSW;6;81%;90%;4
Bismarck, ND;92;57;92;63;Mostly sunny;SE;12;46%;36%;8
Boise, ID;85;51;77;49;Mostly sunny, nice;N;8;36%;0%;8
to this
Billings, MT;93;62;80;53;
Birmingham, AL;80;70;81;69;
Bismarck, ND;92;57;92;63;
Boise, ID;85;51;77;49;
I can find using \;\d+\;\d+\;\d+\;\d+\;
but I can't delete to the end of the line.
I tried adding \r\n to the end of the above like this: \;\d+\;\d+\;\d+\;\d+\;\r\n
but that replace all my City information with the actual regex code.
Any ideas? I feel like i'm missing something very simple....
thanks!