• Help needed :) Automate deleting number and spacing

    5
    0 Votes
    5 Posts
    3k Views
    guy038G

    Hello Nazrulsyah Firaz Fauzee Andylim, Peter Jones and All

    If I fully understand the problem, your first line begins with one or more digits, followed by any spacing, followed by two time values, each of them, separated by a space and written with the template HH:MM:SS:CC ( CC = hundredth of second , from 00 to 99 )

    And you would like to delete the first number, at beginning of each line, containing the templates HH:MM:SS:CC, on 62 files, wouldn’t you ? If so :

    Backup your 62 TXT files, as the same 62 SRT files ( IMPORTANT )

    Open the Find in files dialog ( Ctrl + Shift + F )

    In the Find What : zone, type ^\d+\h+(?=\d\d:\d\d:\d\d:\d\d)

    Leave the Replace with : zone EMPTY

    In the Filters zone, type *.SRT

    In the Directory zone, type the absolute location of these 62 SRT files

    Select the Regular expression search mode

    Uncheck, if necessary, the In all sub-folders and In hidden folders options

    Click on the Replace in Files button and click on the OK button to valid that S/R

    Et voilà !

    Remark : If anything goes wrong, NO panic : just, delete the 62 SRT files, as you STILL get the 62 original TXT files :-)

    For instance, from the text below :

    2 15:25:23:80 15:25:25:37 Blah, blah Blah, blah Blah, blah ......... ......... 7 10:00:01:00 10:00:02:07 When I was a child, I used to go, 2 times per week, to Mr Parker's work-shop to contemplate, with fascination, all the automatons, build by the old man. More than 1 hundred, with their sparkling colours, lay on numerous shelves... ......... ......... 11 03:07:59:77 03:08:01:13 more than one line in the SRT goes here

    you would obtain, the replaced text below :

    15:25:23:80 15:25:25:37 Blah, blah Blah, blah Blah, blah ......... ......... 10:00:01:00 10:00:02:07 When I was a child, I used to go, 2 times per week, to Mr Parker's work-shop to contemplate, with fascination, all the automatons, build by the old man. More than 1 hundred, with their sparkling colours, lay on numerous shelves... ......... ......... 03:07:59:77 03:08:01:13 more than one line in the SRT goes here

    Notes :

    Only, the three numbers 2, 7 and 11, at beginning of lines, and the following spacing characters, are deleted

    Luckily, the lines, which begin with a number, but not followed by a template, of the form HH:MM:SS:CC, remain unchanged !

    From beginning of line ( ^ ), the regex engine looks for a non null range of digits ( \d+ ), followed by some non null spacing characters ( \h+ ).

    Then, due to the syntax (?=\d\d:\d\d:\d\d:\d\d), named a positive look-ahead, the regex engine, verifies that, at cursor position, a time value, with the template HH:MM:SS:CC can be found. If so, the overall regex matches that initial number and the spacing, after it.

    And, as the Replace zone is EMPTY, it’s , simply, deleted, from the file’s contents

    Best Regards,

    guy038

    P.S. :

    BTW, are my two sentences, at middle of the text, looks like “fair” English prose ?!

  • 1 Votes
    1 Posts
    2k Views
    No one has replied
  • Plugin to let you preview BBcode?

    Locked
    2
    0 Votes
    2 Posts
    7k Views
    PeterJonesP

    If it were me wanting to preview BBCode, I would use the Preview HTML plugin, which by default renders HTML… But it allows you to define a filter to run an external converter to convert from language “X” to HTML. Thus, I’ve got mine set up to convert Markdown and Perl’s POD documentation-markup to HTML.

    ; Content of Filters.ini file [Markdown] Extension=.md .markdown Language=Markdown Command=c:\perl\site\bin\multimarkdown.bat "%1" [PerlPOD] Extension=.pm .pod .pl Language=Perl Command=c:\perl\bin\pod2html_clean.bat -css=c:\perl\bin\pod2html.css "%1"

    If you can find a BBCode to HTML converter (I did a quick google, and saw some promising links, but I know nothing about it, so cannot evaluate the converters themselves). On my computer, I would probably grab a Perl module that does the conversion, like HTML::BBCode or Parse::BBCode, write a quick script to use the perl module to convert a BBCode file to HTML, and use that converter script up as the Command in a PreviewHTML Filter Definition:

    [BBCode] Extension=.bbcode .bbc Language=BBCode Command=c:\batch\bbcode2html.bat "%1"

    (One caveat on the Preview HTML plugin: the Notepad++ Installer seems to think it’s an “unstable” plugin, and disables it every time NPP upgrades. However, I have never seen Preview HTML crash NPP, so I don’t know why the installer claims that it is unstable. It might be one of those situations, discovered recently, where an earlier plugin in your plugin list gets incorrectly blamed for a later plugin’s crash, but I have no way of proving that. I just move the PreviewHTML.dll back into the main plugins directory from plugins\disabled after every upgrade.)

  • features of notepad++

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Hi there

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    Saad MuhammadS

    @Martin-Kaymer-Blake said:

    How do I use notepad ++ to compare 2 or more files and highlight or get an output of difference between these files?

    Install notepad++ on your PC and follow the instructions below:
    STEP 1- Go to files and then open the files you want to compare.
    STEP 2- Go to plugin > plugin manager > show plugin manager > available > compare.
    STEP 3- After that, both files you wanted to compare will be shown side by side on your screen and you will see the difference highlighted.

    Tips: You can also use Winmerge software to compare two text files.

  • future features of notepad++

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Folder as Workspace pane a pain every launch

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Margin fold collapsing for code blocks - Visual Studio Style

    Locked
    5
    0 Votes
    5 Posts
    3k Views
    PhilCxP

    Apparently, this is indeed a Scintilla issue. I found via Google search, a feature request thread titled “Fold { on relevant line”.
    https://sourceforge.net/p/scintilla/feature-requests/8/?page=0

    Note that this request is request number eight (8) and the date is fifteen (15) years ago! When an open request in a list currently numbering in four digits is numbered with a single digit, you can probably deduce no solution is likely anytime soon.

    Seems to me the only general solution for scintilla is to trigger fold start on the list of “foldable” language structures, and base fold ends on a multiline regex pattern that encompasses the language syntax definition of the structure. (That is, the one the language parser understands)

  • Defined Language "if" highlighting within words

    7
    0 Votes
    7 Posts
    5k Views
    Ashok KumarA

    please shift the folders open & close codes from code1 to code2
    e.g.
    <Keywords name=“Folders in code1, open”>if for</Keywords>
    <Keywords name=“Folders in code1, close”>endif enfor</Keywords>
    <Keywords name=“Folders in code2, open”></Keywords>
    <Keywords name=“Folders in code2, close”></Keywords>
    should be
    <Keywords name=“Folders in code1, open”></Keywords>
    <Keywords name=“Folders in code1, close”></Keywords>
    <Keywords name=“Folders in code2, open”>if for</Keywords>
    <Keywords name=“Folders in code2, close”>endif enfor</Keywords>

  • No longer able to select / replace tabs, spaces, underscore

    8
    0 Votes
    8 Posts
    5k Views
    Scott SumnerS

    @Scott-Sumner

    Okay, so I’ll reply to myself since no one else has. However, if I like my own explanation, I can’t +1 it ! :(

    My experimentation has shown me that the “rolling-color-cursor” can represent either NO INPUT in the “Find what” box, or input that consists only of line-endings. I’m rather shocked because I’ve never noticed this behavior before. I thought someone could elaborate on its “deeper meaning” or history, if there is any. But I guess not…

    +1

    :-)

  • duplicate rows

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    guy038G

    Hello Νικόλαος Κερασιώτης,

    If so, just refer to the post, below :

    https://notepad-plus-plus.org/community/topic/12490/i-want-to-keep-only-unique-lines/2

    This post shows TWO methods :

    A first one which does not keep the original order of the lines

    A second one, much longer, but that will keep the original order of the lines

    From what you replied to Scott, I suppose that the cases B) or C), in METHOD 1 section should be convenient to you :-))

    Best Regards

    guy038

  • Notepad++ replace all the strings between two characters.

    Locked
    4
    0 Votes
    4 Posts
    12k Views
    Shakespeare WillianS

    @guy038
    Thanks for your replay, your solution works. That’s the exactly answer what I want.

  • Problem with launching

    Locked
    1
    0 Votes
    1 Posts
    995 Views
    No one has replied
  • extending notepad with modules (where are do you save them)

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    Nolan JorgerN

    I’ve already added Python Script as an add-on to my Notepad++ editor and have written a few scripts to automate some editing tasks. Now I want to add a module where I can declare, instantiate and use constants in my projects. I found a solution for this which is a simple module/class, but doesn’t specify where this should be stored so that all my Python Script projects can include/import this.

    Isn’t there a default folder where extensions/modules/classes should be stored?

    Any help on this subject will greatly appreciated.

    Nolan

  • Copy bookmarked lines

    Locked
    3
    0 Votes
    3 Posts
    9k Views
    Måns ThelanderM

    Thanks a lot :-)

    BR Måns

  • How to open and edit .tpl files?

    4
    0 Votes
    4 Posts
    7k Views
    PeterJonesP

    I had no problem reading the TPL file you linked in Notepad++. However, the image you linked showed a different file name. Did you really upload the same file that you’re trying and failing to read?

    Running Notepad++ > ? > Debug Info > Copy debug info into clipboard, and pasting that into your reply, might give us some clue as to what’s going on. For example, my working configuration is:

    Notepad++ v7.2 (32-bit) Build time : Nov 2 2016 - 11:26:20 Path : C:\Program Files (x86)\Notepad++\notepad++.exe Admin mode : ON Local Conf mode : OFF OS : Windows 7 Plugins : ComparePlugin.dll dbgpPlugin.dll mimeTools.dll NppConverter.dll NppExec.dll NppExport.dll NppFTP.dll NppTextFX.dll PluginManager.dll PreviewHTML.dll PythonScript.dll

    By the way, when writing/editing a post or reply on the forum, you can get help for Markdown (the formatting engine for this forum) by clicking on the ? next to the word “Compose” in the upper-right corner of the edit box:

    This shows that, to embed an image (to show it in the post), you can use the following syntax: ![](http://i.imgur.com/swcst1Z.png)

  • Don't Understand Encoding & Language Settings

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Claudia FrankC

    @Edward-Sappo

    Language refers to programming languages and if you select one,
    than the current document gets colored based on the programming language specifics.

    Encoding refers to byte representation of text. A simple text, as written like
    the one I’m typing right now, can be saved differently. An editor needs to know
    this in advance to show the characters correctly.
    Npp uses mozillas chardet library to find out how the text is saved and which codec
    needs to be used to decode the file to show the proper characters.
    But because of the problem that most codecs share multiple characters
    npp (correctly, chardet library) might identify the wrong codec and therefore you have the menu to set it manually to the right one.
    Or you can use it to convert it to another codec.

    Cheers
    Claudia

  • Notepad++ Changes Tilde's in File to Line Feeds

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    Claudia FrankC

    @infoalisaa

    the reason why asking for the file is because I assume that it
    isn’t an ascii tilde but something else.
    Why do you assume it must be a tilde?
    Because some other app is showing it like that?
    Can you create such a file with this app and upload it?

    Cheers
    Claudia

  • How to add new 8 bit codepage into encodings menu?

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Auto fishing script help needed please

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    MAPJe71M

    Sorry to say but IMO this is like asking your car dealer for help on fixing the bumps in the road on the way to your destination!

    I think you will have a higher chance of finding help in a forum/community related to Trove.