DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Control lines  (Read 3,548 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
Control lines
« on: December 29, 2013, 01:58 PM »
I would like

a text editor able to control lines in special ways.

By example :
1. Maintain lines 1,5,9,13,17,21, and so on until the final of the txt file.
That is a aritmetic progression of reason equal to 4, where the first is 1.
Delete the rest of lines.

2. Any other criteria over the lines.

Note : i am only looking now for the 1. . It's the important case to me now.

Best Regards
Happy New Year
:-*

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,027
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Linux User
Re: Control lines
« Reply #1 on: December 31, 2013, 06:46 AM »
Textpad 5 I found to be particularly useful regarding line manipulation.  You can 'bookmark' lines you want to keep and then "Delete unselected lines".  I think Notepad++ can do similar, but it's somewhere else in the menu.  To select the lines you want programatically, Textpad has extensive support for macros (almost as good as scripting):
http://www.textpad.com/add-ons/macros.html
and Notepad++ can be scripted with Python via the Python plugin:
http://www.sivachandran.in/2012/04/scripting-notepad-with-python.html

Sorry I don't have a more definitive answer, hope it helps though.  :(
All children left unattended will be given a mocha and a puppy.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
Re: Control lines
« Reply #2 on: January 01, 2014, 02:48 AM »
Thanks a lot Edvard and happy new year 2014.

At the present moment I am applying the wonderful script from Skwire
http://www.donationcoder.com/forum/index.php?topic=36898.0

I'll take a look to both programs. At the present I know notepad++ that i am using as an alternative to PSPad where i find more confortable.

Best Regards
:-*

Original address: https://www.donationcoder.com/forum/index.php?topic=36897.0