<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Is it possible to use regex to achieve this?]]></title><description><![CDATA[<p dir="auto">Hello everyone, I sometimes use Notepad++ but I know very little about regex function, so I’m looking for some help with it.</p>
<p dir="auto">Here’s a brief description of my problem:</p>
<ol>
<li>
<p dir="auto">Got some time-series data files that contain missing-data during a certain period, so I want to replace each missing value with the one from the same date of the previous year.</p>
</li>
<li>
<p dir="auto">There are a little more than 100 files. the missing-data in every file is from line 488 to 548. The missing-data are all in the same form as “-9.99e+08”, the remaining lines are all numbers.</p>
</li>
<li>
<p dir="auto">So I wonder if it is possible to perform this kind of replacing with regex: replace line 488 with the value in line 123, line 489 with line 124, and so on, until line 548 with line 183, while the remaining lines stay as they were.</p>
</li>
</ol>
<p dir="auto">Technially I can do this replacement manually, but obviously using regex function is waaaay better (if it’s possible, of course). So if it is possible, could anyone please kindly show me how?</p>
<p dir="auto">Please kindly let me know in case more information about the data was needed.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22683/is-it-possible-to-use-regex-to-achieve-this</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 06:12:11 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22683.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Mar 2022 08:42:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Thu, 10 Mar 2022 11:05:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a> said:</p>
<blockquote>
<p dir="auto">\A … works properly ONLY SINCE the 7.9.1 N++ release</p>
</blockquote>
<p dir="auto">Thanks, good to know. (I probably skimmed that factoid in the past but it wouldn’t have made an impression on me since I’m a novice user of \A.)</p>
<blockquote>
<p dir="auto">Refer also at the end of this topic</p>
</blockquote>
<p dir="auto">Those posts don’t say how \A behavior changed, and I’m not inclined to chase down and crawl through the Boost doc versions or developer issue discussions and commit comments to find out! If you happen to know, maybe share a sentence or two about how it behaved prior to 7.9.1, or link to something (brief!) where one can get a user-level idea of it.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75041</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75041</guid><dc:creator><![CDATA[Neil Schipper]]></dc:creator><pubDate>Thu, 10 Mar 2022 11:05:09 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Thu, 10 Mar 2022 10:29:30 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24294">@moking-c</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/280">@neil-schipper</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/23651">@lycan-thrope</a> and <strong>All</strong>,</p>
<p dir="auto">The <strong><code>\A</code></strong> regex assertion, which <strong>anchors</strong> any further regex to the <strong>very beginning</strong> of a file, was <strong>improved</strong> and works <strong>properly</strong> <em>ONLY SINCE</em> the <strong><code>7.9.1</code></strong> N++ release !</p>
<p dir="auto">Refer also at the <strong>end</strong> of this <a href="https://community.notepad-plus-plus.org/post/75007">topic</a></p>
<p dir="auto">Best Regards,</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75040</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75040</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 10 Mar 2022 10:29:30 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Wed, 09 Mar 2022 08:30:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24294">@moking-c</a><br />
Well, you could do a search on your computer for files starting with the name <code>npp</code> or such, and see if it comes up. Simple Windows search may find the original install file.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75015</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75015</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Wed, 09 Mar 2022 08:30:24 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Wed, 09 Mar 2022 07:32:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/280">@neil-schipper</a> sorry but I didn’t check the previous version before I updated it, so unless it’s possible to check it now I don’t know what it was, although I know I haven’t updated for quite a while, half a year at least, maybe even longer. And thanks for the suggestions, I will have a look!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75014</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75014</guid><dc:creator><![CDATA[Moking C]]></dc:creator><pubDate>Wed, 09 Mar 2022 07:32:18 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Wed, 09 Mar 2022 06:36:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24294">@moking-c</a> said:</p>
<blockquote>
<p dir="auto">the problem disappeared after I updated my N++</p>
</blockquote>
<p dir="auto">Good to hear. Do you know what the old version was? There have been changes over the years to npp’s regex component (based on seeing other discussions) but I’m not knowledgeable about which would pertain to this situation.</p>
<p dir="auto">I wanted to mention that the data transformation this problem needed could have been solved (on a single file) without any F&amp;R, regex or otherwise. A macro could have done the job. If you’ve never recorded and run macros, it’s a good skill to have. In this case, only normal cursor movement, text selection (shift-arrow) and copy/paste are needed, and, since <em>goto line</em> (ctl-g) is supported inside a macro, the solution is quite elegant. However, this approach would not have offered the ability to process many files in one super-process, so in this case it would have been far less desirable.</p>
<p dir="auto">I also wish to draw your attention to the Donate link on the <a href="http://notepad-plus-plus.org" rel="nofollow ugc">notepad-plus-plus.org</a> main page. Presently, the link goes to a page with info on organizations working to provide assistance to distressed people in Ukraine.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75012</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75012</guid><dc:creator><![CDATA[Neil Schipper]]></dc:creator><pubDate>Wed, 09 Mar 2022 06:36:31 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Wed, 09 Mar 2022 05:46:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/280">@neil-schipper</a> hi, thank you for your reply. I was using the second expression all along but the problem kept happening. I wondered a possible reason and as it turned out: the problem disappeared after I updated my N++ to the newest version. Don’t know what possibly triggered the problem but I’m glad now it’s fine. So problem solved, thank you guys :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75011</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75011</guid><dc:creator><![CDATA[Moking C]]></dc:creator><pubDate>Wed, 09 Mar 2022 05:46:56 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Wed, 09 Mar 2022 05:22:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24294">@moking-c</a></p>
<p dir="auto">I could recreate your problem using Find expression:</p>
<p dir="auto"><code>(?:.*\R){122}\K((?:.+\R){61})((?:.+\R){304})(?:.+\R){61}</code></p>
<p dir="auto">which is not the expression we suggested to you. I find that when using the expression we suggested:</p>
<p dir="auto"><code>(?-s)\A(?:.*\R){122}\K((?:.+\R){61})((?:.+\R){304})(?:.+\R){61}</code></p>
<p dir="auto">the problem is not present.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75010</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75010</guid><dc:creator><![CDATA[Neil Schipper]]></dc:creator><pubDate>Wed, 09 Mar 2022 05:22:24 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Wed, 09 Mar 2022 03:33:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/280">@neil-schipper</a> <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a>  Hi I’m back, I have tested with the solution guy038 proposed, and it worked as I wanted for line 488 to 548, which means every value from May-1-1977 to June-30-1977 is replaced by value of the same day from the previous year.</p>
<p dir="auto">However there is a new problem, for some reason, 487 lines after the 548th line (namely from line 1036), another replacement happened for another consecutive 61-days, then another 487 lines after that the same thing, then again and agian until the end of the file. I tried with different files but the problem stays the same.</p>
<p dir="auto">Here is the first 1650 lines of one file (8036 lines in total):</p>
<pre><code>19760101
0.861279
0.63935
0.815848
0.85011
0.85429
0.711488
0.724875
0.758732
0.891949
0.725364
0.834223
0.727606
0.76587
0.81763
0.79084
0.807534
0.86574
0.551381
0.762547
0.801668
0.656514
0.781513
0.681844
0.738318
0.704652
0.676384
0.707758
0.820785
0.854524
0.626804
0.730777
0.830473
0.843837
0.554194
0.676896
0.857713
0.859087
0.803803
0.847785
0.850575
0.794926
0.831169
0.777736
0.856632
0.791558
0.824409
0.77538
0.779476
0.876295
0.864965
0.712072
0.76048
0.834397
0.963405
0.744396
0.722086
0.850512
0.758254
0.924798
0.810141
0.750972
0.809876
0.801798
0.762799
0.772453
0.709038
0.879444
0.664188
0.890579
0.756899
0.751971
0.853087
0.6438
0.530601
0.923394
0.551381
0.800341
0.926226
0.590085
0.55775
0.665475
0.83031
0.766856
0.750246
0.750373
0.77217
0.823091
0.804258
0.808051
0.819401
0.817983
0.798441
0.855523
0.868338
0.946743
0.865679
0.701087
0.8597
0.632363
0.839273
0.786932
0.792369
0.754476
0.772194
0.924134
0.852164
0.81956
0.721237
0.890511
0.454826
0.579253
0.60935
0.555945
0.856232
0.613306
0.509154
0.52088
0.649002
0.532177
0.805398
0.727066
0.691463
0.751143
0.523794
0.553108
0.724757
0.802776
0.600489
0.467545
0.497832
0.399196
0.571678
0.733187
0.450498
0.401125
0.434543
0.559158
0.892366
0.261994
0.769915
0.438003
0.867489
0.565258
0.551884
0.517114
0.706856
0.786566
0.638413
0.370883
0.654423
0.387347
0.954666
0.846861
0.860648
0.650334
0.736323
0.586627
0.858595
0.406877
0.677217
0.63572
0.732529
0.855452
0.736425
0.703959
0.737804
0.641566
0.676984
0.55135
0.581346
0.733693
0.718436
0.635855
0.6407
0.815116
0.549874
0.590428
0.825093
0.757499
0.894954
0.865714
0.745669
0.659434
0.637337
0.503654
0.587852
0.51116
0.679061
0.72704
0.58882
0.609705
0.930942
0.782083
0.75301
0.561274
0.677074
0.84913
0.774428
0.811375
0.57611
0.456152
0.497698
0.719494
0.60149
0.641203
0.561913
0.67016
0.647768
0.739387
0.733412
0.74336
0.683523
0.864482
0.552208
0.520626
0.502094
0.794176
0.8134
0.680158
0.715776
0.868319
0.797141
0.871414
0.851678
0.874979
0.828469
0.772831
0.717835
0.669884
0.641085
0.683853
0.703908
0.811896
0.893346
0.805024
0.711092
0.734044
0.78693
0.539453
0.615624
0.698477
0.603366
0.673295
0.70392
0.70215
0.678104
0.67266
0.611907
0.563338
0.644245
0.887042
0.833077
0.887844
0.841572
0.870105
0.747739
0.692534
0.867356
0.629594
0.866353
0.956981
0.789397
0.654756
0.837292
0.911165
0.883223
0.881301
0.588325
0.618182
0.646552
0.665178
0.687022
0.829979
0.709184
0.862003
0.896828
0.800393
0.919446
0.700125
0.6809
0.60217
0.639477
0.899278
0.832658
0.834138
0.771841
0.595319
0.6771
0.952955
0.57863
0.637618
0.679509
0.84619
0.860547
0.505587
0.44738
0.578579
0.960146
0.548613
0.533035
0.651032
0.772408
0.88239
0.650151
0.903148
0.578445
0.774398
0.687048
0.85368
0.472826
0.583693
0.644478
0.754171
0.541813
0.910871
0.927567
0.931558
0.768289
0.829816
0.605306
0.734616
0.845635
0.98841
0.874717
0.860979
0.6719
0.77402
0.950762
0.816093
0.831349
0.897201
0.699312
0.735787
0.751397
0.791417
0.814872
0.923965
0.896502
0.938048
0.922898
0.877988
0.845695
0.835075
0.618866
0.745853
0.908296
0.939772
0.866772
0.821761
0.621332
0.75946
0.913417
0.836625
0.565187
0.778674
0.702792
0.885896
0.848794
0.697933
0.833259
0.891373
0.683586
0.841295
0.801597
0.76561
0.815133
0.923175
0.781937
0.826646
0.895309
0.675946
0.668459
0.739122
0.577881
0.72949
0.939385
0.688913
0.822233
0.748176
0.757948
0.85522
0.839228
0.722284
0.841072
0.744279
0.718127
0.830759
0.80282
0.785418
0.850985
0.815889
0.821133
0.798385
0.77654
0.72111
0.667313
0.760178
0.630215
0.830478
0.812394
0.802021
0.849209
0.785188
0.74761
0.634821
0.667123
0.741724
0.737529
0.624217
0.728511
0.722317
0.759757
0.80312
0.833467
0.837305
0.789449
0.822703
0.908578
0.846494
0.65568
0.886391
0.936036
0.847128
0.845036
0.79244
0.76605
0.723605
0.862058
0.740146
0.849118
0.635465
0.732773
0.845228
0.696828
0.519942
0.744513
0.792329
0.796718
0.942815
0.919159
0.77218
0.875672
0.82636
0.762686
0.891561
0.562017
0.796118
0.779124
0.917325
0.772986
0.583468
0.769407
0.78586
0.80382
0.775169
0.859602
0.894524
0.56103
0.785584
0.928936
0.917563
0.810876
0.886325
0.827187
0.678709
0.872699
0.906344
0.805191
0.707826
0.872665
0.914539
0.987672
0.921496
0.517303
0.664913
0.542707
0.625817
0.421014
0.459253
0.796535
0.757798
0.736104
0.817074
0.890681
0.789692
0.66473
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
-9.99e+08
0.836131
0.866753
0.867263
0.916096
0.887719
0.853981
0.676908
0.616187
0.682614
0.954773
0.64539
0.543872
0.695058
0.732852
0.653907
0.723207
0.615822
0.885404
0.731653
0.661017
0.68394
0.559811
0.669198
0.530185
0.637001
0.756607
0.677038
0.778769
0.779917
0.740455
0.815614
0.885241
0.69174
0.583801
0.943773
0.940973
0.91004
0.761516
0.774637
0.85174
0.676035
0.742487
0.785569
0.484571
0.59199
0.627097
0.898767
0.968204
0.787542
0.74035
0.834226
0.677075
0.502937
0.512093
0.538465
0.599262
0.759905
0.768991
0.929455
0.848801
0.719563
0.786245
0.728254
0.734167
0.820372
0.934146
0.837547
0.786536
0.686434
0.959734
0.849412
0.886108
0.977055
0.594129
0.74686
0.837966
0.532576
0.682217
0.657134
0.85696
0.878814
0.870945
0.836765
0.636731
0.552201
0.834724
0.592033
0.798353
0.48835
0.544845
0.799313
0.880586
0.699604
0.690358
0.750559
0.783998
0.886978
0.798649
0.613929
0.703041
0.722894
0.893658
0.621871
0.591265
0.714313
0.828758
0.839654
0.481791
0.519952
0.558471
0.657591
0.658483
0.680348
0.830265
0.695584
0.830729
0.652441
0.478596
0.559381
0.732851
0.632222
0.933217
0.632056
0.885782
0.877757
0.610798
0.487436
0.737622
0.720612
0.570412
0.964913
0.541332
0.578708
0.724876
0.785991
0.811709
0.932315
0.836317
0.860343
0.914826
0.977103
0.87991
0.843604
0.93899
0.807984
0.478145
0.684336
0.878268
0.944834
0.874653
0.874839
0.778016
0.960282
0.814847
0.962328
0.805771
0.937876
0.871562
0.746873
0.772705
0.874317
0.890748
0.635146
0.884373
0.731851
0.908119
0.858336
0.953088
0.909335
0.849745
0.825982
0.71008
0.764788
0.681282
0.721604
0.841112
0.902015
0.884838
0.792179
0.706275
0.687724
0.834614
0.705318
0.904884
0.890418
0.680612
0.822347
0.722613
0.695962
0.745075
0.730692
0.804184
0.870755
0.69543
0.800915
0.882411
0.82348
0.776107
0.704746
0.715549
0.690752
0.842874
0.880019
0.892782
0.838986
0.891192
0.678414
0.757608
0.759569
0.757347
0.853351
0.812722
0.654898
0.760851
0.845718
0.728627
0.73796
0.707816
0.665172
0.687772
0.716698
0.864222
0.795043
0.732905
0.75367
0.681122
0.72069
0.719385
0.705205
0.690807
0.622584
0.749701
0.825489
0.881133
0.790464
0.794818
0.747486
0.748143
0.729431
0.740564
0.593458
0.840583
0.801024
0.788268
0.658461
0.786445
0.887206
0.81634
0.765944
0.797711
0.760906
0.789128
0.765153
0.940649
0.704864
0.630835
0.71393
0.712204
0.83959
0.902891
0.782618
0.849622
0.799598
0.779014
0.816549
0.742479
0.777234
0.735942
0.866245
0.914344
0.848502
0.806184
0.358725
0.566177
0.826013
0.866685
0.818705
0.853097
0.802419
0.956955
0.497208
0.54816
0.903758
0.776191
0.853008
0.849722
0.917609
0.899931
0.883123
0.900814
0.837843
0.764594
0.516378
0.834907
0.691393
0.558654
0.64511
0.648448
0.771393
0.564797
0.739992
0.748622
0.840478
0.981797
0.969998
0.9033
0.434365
0.444442
0.306004
0.369654
0.438191
0.650419
0.896003
0.675395
0.35597
0.681206
0.512912
0.569385
0.564757
0.587951
0.546101
0.768435
0.900302
0.966469
0.85381
0.806948
0.625989
0.844904
0.698311
0.735221
0.383207
0.689985
0.716687
0.834596
0.701945
0.825915
0.576414
0.651538
0.759884
0.951135
0.409174
0.439277
0.509335
0.723432
0.751576
0.685702
0.848125
0.803903
0.729284
0.809658
0.584571
0.754005
0.751505
0.717565
0.704655
0.940253
0.711674
0.694073
0.501756
0.490655
0.559477
0.620096
0.633732
0.91426
0.599074
0.708023
0.978366
0.774734
0.637482
0.721648
0.738713
0.925801
0.644712
0.662191
0.673547
0.708211
0.926767
0.737415
0.744534
0.67419
0.693929
0.718661
0.710973
0.793998
0.636627
0.624714
0.783406
0.603876
0.690792
0.797296
0.865424
0.674359
0.784033
0.654728
0.632607
0.632301
0.912738
0.725884
0.724593
0.753238
0.741099
0.615854
0.895581
0.692194
0.803403
0.868497
0.855541
0.749735
0.803885
0.813455
0.603231
0.796531
0.916683
0.629578
0.854317
0.843109
0.857396
0.621837
0.667502
0.846695
0.56497
0.623414
0.697841
0.734181
0.82496
0.696169
0.856786
0.809957
0.631091
0.812794
0.567007
0.521882
0.523688
0.64687
0.494893
0.82296
0.921457
0.681975
0.577943
0.655154
0.639337
0.726948
0.871011
0.91536
0.80191
0.79107
0.845367
0.733589
0.618966
0.640054
0.626495
0.654637
0.827453
0.626234
0.586907
0.737486
0.871369
0.744196
0.899875
0.756121
0.836082
0.759939
0.506683
0.591154
0.649506
0.765266
0.862642
0.678634
0.571427
0.527047
0.577012
0.706611
0.854327
0.815486
0.769696
0.737865
0.776539
0.880129
0.774135
0.708852
0.791615
0.444604
0.719717
0.661801
0.779278
0.941172
0.971302
0.76132
0.519803
0.665904
0.875633
0.595209
0.709298
0.658597
0.637149
0.833972
0.845973
0.719997
0.826909
0.768826
0.914542
0.864581
0.879524
0.6807
0.785196
0.817004
0.659213
0.699365
0.762627
0.70744
0.741112
0.866791
0.771003
0.941714
0.938608
0.978949
0.866255
0.900698
0.844959
0.576439
0.493356
0.903984
0.691131
0.777533
0.840955
0.859403
0.850475
0.889618
0.760268
0.652681
0.873326
0.971734
0.913371
0.869047
0.595694
0.743442
0.833636
0.753492
0.796033
0.905009
0.881209
0.845966
0.755167
0.714309
0.772477
0.836677
0.790489
0.723467
0.802009
0.832939
0.814055
0.826476
0.877211
0.937982
0.728759
0.85532
0.75207
0.676111
0.929445
0.51663
0.670108
0.755816
0.708873
0.678156
0.692006
0.730669
0.856227
0.782851
0.726655
0.772959
0.658088
0.726498
0.651435
0.859729
0.800951
0.568529
0.535403
0.721962
0.862175
0.885399
0.988131
0.724066
0.748942
0.797393
0.730905
0.940816
0.746697
0.719995
0.704544
0.878256
0.582965
0.613394
0.840532
0.842055
0.656017
0.603868
0.757523
0.868932
0.829267
0.761809
0.819433
0.839814
0.829098
0.78693
0.85392
0.936666
0.850522
0.90359
0.87607
0.800529
0.793
0.763728
0.750129
0.920639
0.735904
0.828561
0.708838
0.77193
0.854917
0.603009
0.785708
0.66253
0.86789
0.66089
0.913197
0.576799
0.793676
0.930151
0.862362
0.867669
0.831375
0.682526
0.85581
0.790335
0.665271
0.839721
0.809543
0.837581
0.824564
0.826579
0.807225
0.838078
0.837836
0.738916
0.695997
0.671628
0.875085
0.564822
0.448339
0.947212
0.834571
0.866252
0.885403
0.79063
0.68605
0.924402
0.85748
0.801301
0.883765
0.852217
0.844071
0.863322
0.636358
0.758935
0.682838
0.652642
0.534512
0.766893
0.854256
0.618756
0.67414
0.828532
0.651545
0.515968
0.393888
0.53342
0.418901
0.79626
0.713537
0.876694
0.805472
0.725855
0.668152
0.589819
0.7911
0.663408
0.52289
0.76729
0.754393
0.520564
0.870957
0.882532
0.646034
0.581456
0.532811
0.67623
0.625109
0.898309
0.70383
0.638062
0.498424
0.546953
0.532309
0.605405
0.608263
0.516172
0.826003
0.930894
0.882761
0.773797
0.87079
0.673912
0.600811
0.538492
0.621809
0.576358
0.602106
0.722918
0.747293
0.653289
0.886134
0.620588
0.628709
0.493021
0.73518
0.778911
0.696622
0.791474
0.737971
0.691694
0.704637
0.94091
0.885923
0.782929
0.700125
0.513886
0.758069
0.954387
0.740409
0.681012
0.793743
0.835359
0.700924
0.616997
0.699768
0.799348
0.775469
0.544167
0.711081
0.742179
0.72002
0.699855
0.745141
0.809835
0.713998
0.579192
0.92177
0.866942
0.758939
0.814777
0.54337
0.861682
0.473521
0.609848
0.627176
0.708477
0.760138
0.824877
0.719576
0.663455
0.58045
0.656304
0.664788
0.706399
0.726599
0.751148
0.725933
0.781674
0.952645
0.471137
0.667111
0.709315
0.727874
0.710384
0.441637
0.473946
0.698735
0.896511
0.552398
0.511788
0.578768
0.671551
0.737576
0.879066
0.566436
0.797725
0.94521
0.685904
0.876672
0.76914
0.650308
0.64822
0.698254
0.629243
0.767794
0.839869
0.83025
0.556691
0.580684
0.792737
0.593972
0.682469
0.840116
0.803805
0.539147
0.691146
0.627961
0.662673
0.918106
0.705105
0.701601
0.712515
0.888186
0.757104
0.749421
0.948783
0.850838
0.891012
0.713299
0.755185
0.578195
0.716412
0.971721
0.671977
0.753846
0.870988
0.920575
0.806703
0.852813
0.888805
0.898588
0.4975
0.61573
0.736166
0.668529
0.736551
0.727545
0.847203
0.605686
0.663058
0.894496
0.661557
0.749354
0.704229
0.957454
0.786153
0.737909
0.890996
0.429769
0.595261
0.796289
0.455835
0.941152
0.844671
0.564633
0.700894
0.624282
0.750837
0.883672
0.656719
0.958829
0.970417
0.812087
0.814731
0.849432
0.886069
0.799635
0.903555
0.945573
0.810987
0.867661
0.78013
0.556955
0.817042
0.796021
0.757937
0.875215
0.894537
0.988385
0.922766
0.98995
0.969588
0.976298
0.851149
0.825889
0.850585
0.897927
0.907472
0.842947
0.904161
0.869568
0.980666
0.733161
0.804782
0.758765
0.606143
0.82797
0.633536
0.598513
0.937875
0.784087
0.844023
0.939508
0.558054
0.668061
0.932818
0.854809
0.695408
0.686642
0.813118
0.856551
0.771858
0.67161
0.92111
0.792044
0.734915
0.897164
0.638298
0.687853
0.630784
0.756411
0.837975
0.780561
0.876489
0.865644
0.780311
0.765819
0.740636
0.85715
0.821093
0.804934
0.907837
0.860765
0.87428
0.675792
0.623965
0.620552
0.644648
0.701038
0.838746
0.865594
0.744719
0.801342
0.821797
0.801365
0.801728
0.57233
0.546767
0.697883
0.762904
0.723692
0.831909
0.764214
0.747487
0.893485
0.707687
0.760148
0.745767
0.758963
0.742985
0.788506
0.682582
0.827728
0.71821
0.80942
0.667538
0.79141
0.787589
0.687385
0.867209
0.80302
0.842164
0.875532
0.75177
0.575069
0.641816
0.661429
0.668912
0.643089
0.666221
0.651776
0.742026
0.637342
0.845863
0.592719
0.818359
0.690785
0.655666
0.688755
0.850532
0.791154
0.640505
0.683015
0.81357
0.719042
0.843689
0.8786
0.786533
0.786708
0.808684
0.909939
0.740465
0.847569
0.932707
0.888207
0.776571
0.781816
0.887403
0.885626
0.823379
0.778137
0.786054
0.82256
0.819663
0.833313
0.497367
0.746861
0.679642
0.879456
0.474031
0.3397
0.566099
0.799432
0.834974
0.833604
0.788813
0.867911
0.783175
0.857595
0.413003
0.794354
0.611985
0.602884
0.808574
0.651419
0.738423
0.655013
0.909866
0.641503
0.928404
0.445232
0.535535
0.421097
0.397735
0.459941
0.790891
0.752763
0.478754
0.590954
0.638791
0.843189
0.381203
0.63755
0.499764
0.640947
0.425415
0.688612
0.693667
0.662005
0.49023
0.555375
0.485743
0.47984
0.620081
0.931921
0.735027
0.583709
0.764221
0.939655
0.659177
0.699562
0.783239
0.88313
0.897265
0.417746
0.469076
0.650072
0.603911
0.642128
0.910823
0.599614
0.568594
0.741187
0.87197
0.909504
0.623449
0.588
0.568447
0.809002
0.963046
0.764985
0.686924
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/75009</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75009</guid><dc:creator><![CDATA[Moking C]]></dc:creator><pubDate>Wed, 09 Mar 2022 03:33:03 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Tue, 08 Mar 2022 05:51:19 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24294">@moking-c</a>,</p>
<ol>
<li>
<p dir="auto">Since the need is to copy and replace <strong>complete lines</strong>, the actual text on the lines is <strong>not relevant</strong> to the solution.</p>
</li>
<li>
<p dir="auto">The 81 was an arithmetic error, which <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a> detected and fixed.</p>
</li>
</ol>
<p dir="auto">So the next thing you should do is <strong>apply the regex in Guy’s last post</strong>, check the result and report back to us.</p>
<p dir="auto">If there are problems and you want to provide text, paste it into a reply as described in the FAQ I linked. There is no file attach mechanism.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74991</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74991</guid><dc:creator><![CDATA[Neil Schipper]]></dc:creator><pubDate>Tue, 08 Mar 2022 05:51:19 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Tue, 08 Mar 2022 04:05:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/280">@neil-schipper</a> thank you very much for you replies. Sorry that I am not familiar with that “code” function, I wanted to attach a file but couldn’t find an option. Like I said to guy038 I will show you the data when I get back to work tomorrow.</p>
<p dir="auto">To answer your two questions, yes and yes. Although that “81” part confuses me a little, but I guess it would make things clearer for both of us when I show you the data later. For now, allow me to explain a little more:</p>
<p dir="auto">the first line in every file is the starting date of the time-series data, then one line for one day for a 22 years. It starts from Jan 1st, 1976, and the missing data is from May 1st, 1977 to June 30, 1977. So I want to replace each day during these two months from the one of 1976 (it’s meteorological data, so this is one easy and reasonable solution). It looks like this:</p>
<p dir="auto">19760101<br />
0.1234<br />
0.23456<br />
0.12345<br />
0.5678<br />
…</p>
<p dir="auto">Anyway, sorry that i couldn’t show you the real data now, I will @ you again with it tomorrow. Thank you for your help and patience.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74990</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74990</guid><dc:creator><![CDATA[Moking C]]></dc:creator><pubDate>Tue, 08 Mar 2022 04:05:15 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Tue, 08 Mar 2022 03:54:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a> thank you very much for trying to help. My data is not confidential so I will show you later (it’s on another computer in my office but today is my day-off).</p>
<p dir="auto">Don’t know this changes anything but my data contains decimal point, like 0.12345. Terribly sorry for not being able to show the real data to you now, I will @ you again when i get back to work tomorrow. Thank you again.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74989</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74989</guid><dc:creator><![CDATA[Moking C]]></dc:creator><pubDate>Tue, 08 Mar 2022 03:54:04 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Mon, 07 Mar 2022 13:58:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a>:</p>
<blockquote>
<p dir="auto">Neil, test it against the text below</p>
</blockquote>
<p dir="auto">Do you really want a guy who was fairly certain that 548-488+1 = 81 to be the one to double check that which you’ve already tested?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74975</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74975</guid><dc:creator><![CDATA[Neil Schipper]]></dc:creator><pubDate>Mon, 07 Mar 2022 13:58:49 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Mon, 07 Mar 2022 13:13:41 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24294">@moking-c</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/280">@neil-schipper</a> and <strong>All</strong>,</p>
<p dir="auto">My <strong>previous</strong> solution works fine for a <strong>single</strong> file but cannot be used with the <strong><code>Find in Files</code></strong> dialog because of the use of the <strong><code>Edit &gt; Line Operations &gt; Reverse Line Order</code></strong> feature !</p>
<p dir="auto">So, using the <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/280">@neil-schipper</a>’s method, I arrive at the following solution :</p>
<p dir="auto">SEARCH <strong><code>(?-s)\A(?:.*\R){122}\K((?:.+\R){61})((?:.+\R){304})(?:.+\R){61}</code></strong></p>
<p dir="auto">REPLACE <strong><code>\1\2\1</code></strong></p>
<p dir="auto"><strong>Neil</strong>, test it against the text below :</p>
<pre><code class="language-diff">12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
line 01 to copy
line 02 to copy
line 03 to copy
line 04 to copy
line 05 to copy
line 06 to copy
line 07 to copy
line 08 to copy
line 09 to copy
line 10 to copy
line 11 to copy
line 12 to copy
line 13 to copy
line 14 to copy
line 15 to copy
line 16 to copy
line 17 to copy
line 18 to copy
line 19 to copy
line 20 to copy
line 21 to copy
line 22 to copy
line 23 to copy
line 24 to copy
line 25 to copy
line 26 to copy
line 27 to copy
line 28 to copy
line 29 to copy
line 30 to copy
line 31 to copy
line 32 to copy
line 33 to copy
line 34 to copy
line 35 to copy
line 36 to copy
line 37 to copy
line 38 to copy
line 39 to copy
line 40 to copy
line 41 to copy
line 42 to copy
line 43 to copy
line 44 to copy
line 45 to copy
line 46 to copy
line 47 to copy
line 48 to copy
line 49 to copy
line 50 to copy
line 51 to copy
line 52 to copy
line 53 to copy
line 54 to copy
line 55 to copy
line 56 to copy
line 57 to copy
line 58 to copy
line 59 to copy
line 60 to copy
line 61 to copy
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
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EFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOP
</code></pre>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74965</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74965</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 07 Mar 2022 13:13:41 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Mon, 07 Mar 2022 12:13:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a>: Hi. I saw your solution come up when I was just about done mine but I haven’t made sense of it yet.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24294">@moking-c</a>:</p>
<p dir="auto">When asking for data transformation help it’s best that you supply sample text, preferably in a <em>Literal Text Block</em> (by surrounding with lines containing three backquotes) as explained <a href="https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts">here</a>.</p>
<p dir="auto">For your problem, you should show both the <em>before</em> and the <em>after</em> text. Probably you should first make an artificially shortened version of your problem that contains perhaps 10-20 lines.</p>
<p dir="auto">That said…</p>
<p dir="auto">Is it correct that the lines being copied are always from the same file where the lines are copied to?</p>
<p dir="auto">Is it correct that you wish to do line <em>replacement</em>, and not <em>insertion</em>?</p>
<p dir="auto">If answers to both the above are yes, I have a tested regex that picks up the 3 lines 3-5, and replaces lines 8-10 with the picked up lines. Thus, it converts this:</p>
<pre><code>1
21
335
4245
52345
624515
7124515
81241515
912341515
1035612455
32356124556
323561245578
3235612455053
</code></pre>
<p dir="auto">to this:</p>
<pre><code>1
21
335
4245
52345
624515
7124515
335
4245
52345
32356124556
323561245578
3235612455053
</code></pre>
<p dir="auto">Here it is:</p>
<p dir="auto">F: <code>\A(?:^.*\R){2}\K((?:^.*\R){3})((?:^.*\R){2})((?:^.*\R){3})</code><br />
R: <code>$1$2$1</code></p>
<p dir="auto">To customize for your need, you only need be concerned with the four numbers in <code>{}</code>.</p>
<p dir="auto">The first is the number of initial lines to skip over. For you, 122.</p>
<p dir="auto">The second and fourth are the number of lines to pick up and replace. They must be the same. For you, it’s 80 or 81, I’m not sure. I’ll use 81.</p>
<p dir="auto">The 3rd is number of lines to skip after the picked up segment, so 488-(122+81) = 285.</p>
<p dir="auto">This suggests:</p>
<p dir="auto">F: <code>\A(?:^.*\R){122}\K((?:^.*\R){81})((?:^.*\R){285})((?:^.*\R){81})</code></p>
<p dir="auto">Trust nothing. Verify everything.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74962</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74962</guid><dc:creator><![CDATA[Neil Schipper]]></dc:creator><pubDate>Mon, 07 Mar 2022 12:13:09 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to use regex to achieve this? on Mon, 07 Mar 2022 13:14:00 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24294">@moking-c</a> and <strong>All</strong>,</p>
<p dir="auto">Yes, I think that a <strong>regex</strong> solution is possible;-)) If not <strong>confidential</strong>, could you provide the <strong>exact</strong> text of <strong>one</strong> of your files between lines, let’s say, <strong><code>100</code></strong> to <strong><code>500</code></strong> ?</p>
<p dir="auto">To this purpose, <strong>select</strong> your text ( <strong><code>Ctrl + C</code></strong> ) and, when <strong>replying</strong>, click on the <strong>button</strong> below and paste <strong>all</strong> your text (<strong><code>Ctrl + V</code></strong> ) instead of the <strong><code>code_text</code></strong> indication shown !</p>
<p dir="auto"><img src="/assets/uploads/files/1646653148694-2cebdc75-8b9a-438a-a415-25d2e7c71c50-capture-d-%C3%A9cran-2022-03-07-123711.png" alt="2cebdc75-8b9a-438a-a415-25d2e7c71c50-Capture d’écran 2022-03-07 123711.png" class=" img-fluid img-markdown" /> !</p>
<hr />
<p dir="auto">My <strong>general</strong> idea is :</p>
<ul>
<li>
<p dir="auto">Locate the line <strong><code>548</code></strong> with a <strong>visual</strong> indication</p>
</li>
<li>
<p dir="auto"><strong>Temporarily</strong> reverse the lines <strong>order</strong> of your file</p>
</li>
<li>
<p dir="auto">Go to this line <strong><code>548</code></strong></p>
</li>
<li>
<p dir="auto">Perform <strong><code>61</code></strong> times this <strong>kind</strong> of regex S/R :</p>
<ul>
<li>
<p dir="auto">SEARCH <strong><code>(?-s)^.+\R(?=(.*\R){365}(.+))</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code> \1</code></strong></p>
</li>
</ul>
</li>
<li>
<p dir="auto">Restore the <strong>initial</strong> line order</p>
</li>
</ul>
<p dir="auto">See you later !</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74961</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74961</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 07 Mar 2022 13:14:00 GMT</pubDate></item></channel></rss>