• Is it possible to a xml-file without xml-support?

    8
    0 Votes
    8 Posts
    5k Views
    Klaus LehmannK

    Hello @guy038 . thank You very much for Your good idea! this is the solution!

    in my nortoncommander-clone from Australia: “FCW” I have added in fc.ini:
    [Editor Associations]
    *.{xml}: “c:\Program Files\Notepad++ allegro\notepad++.exe” -nosession -lnormal

    good solution! thanks a lot!

  • remove all text except hex characters

    Locked
    9
    0 Votes
    9 Posts
    3k Views
    PeterJonesP

    It can alternately mean Original Post, as well. You’ve got to take it on context of whether it’s talking about the content or the content creator. :-)

  • 0 Votes
    9 Posts
    2k Views
    Scott SumnerS

    @Terry-R

    It’s a lot of WORK, trying to be helpful! :-)

  • Newbie find and replace

    Locked
    3
    2 Votes
    3 Posts
    1k Views
    Tony HagerT

    Thank you very much!

  • find in files

    Locked
    2
    0 Votes
    2 Posts
    623 Views
    Scott SumnerS

    @Robert-Miller

    Sounds like that is the Find in Files feature conducting its search…seems like normal behavior–do you disagree?

  • Help. Need regex

    3
    0 Votes
    3 Posts
    877 Views
    Terry RT

    First off, apologies @Евгений-Фокин , I misread your question. I’ve come back to it now as I didn’t see you reply to my solution. @Claudia-Frank had upvoted my answer but also misread the question.

    I can see now that in fact you were only wanting to remove the:
    text autoid…</text> IF the line starting with <replacement> in that group of lines had Russian characters in it.

    I have a revised regex which I think fits what you intended. I would suggest testing it by using in ‘Find’ mode first. You could have it bookmark all the instances that it thinks fit the criteria, then look at those before deciding to remove.
    Find What: (?s)<text.+?<replacement><\!\[CDATA\[[\x{080}-\x{4af}].+?text>\R?
    Replace with: empty field here

    The part that checks for a Russian character is the \x{080}-\x{4af}, I hope I’ve got that sequence correct. It only checks the first character, hopefully no non-Cyrillic character at the start with Cyrillic afterwards.

    I would like to hear back from you regardless of whether it helps or not. if it does NOT help, we on the forum are only too willing to offer up other possible solutions.

    Terry

  • Shifting a block of text to the beginning of a line

    Locked
    11
    0 Votes
    11 Posts
    2k Views
    C Ananda RaoC

    Dear Mr Sumner

    Thank you! It worked now.
    I am a little embarrassed to say, but I do not know what I did wrong the first time and what I did right this time.

    Best Regards!

    PS. I am using Notepad++ v7.5.8 32bit

  • help about lines arabic

    Locked
    4
    2 Votes
    4 Posts
    934 Views
    Claudia FrankC

    @saud-s.k

    a little bit cryptic but this one can do it

    editor.setText('\r\n'.join(reversed(['[keep.text]{}'.format(x) for x in editor.getText().splitlines()])))

    Cheers
    Claudia

  • Select multiple words / Copy multiple words

    Locked
    4
    0 Votes
    4 Posts
    2k Views
    Scott SumnerS

    @Terry-R

    I think your idea was covered in the thread I pointed to earlier…see where @guy038 in that thread says:

    SEARCH (?s)^.*?(Your regex to match)|(?s).*\z
    REPLACE…etc

    Like your recent suggestion, that is a destructive search, which may be a downside, although a simple Undo can take care of that after the resultant data is Copy’d out…

  • RegExp full syntax

    Locked
    5
    1 Votes
    5 Posts
    1k Views
    Scott SumnerS

    Ah, okay, I see from your first posting what you mean. No, Notepad++ has no built-in way of doing that. However, it is doable with a bit of prep work. These threads will show how:

    https://notepad-plus-plus.org/community/topic/15318/replace-text-with-incremented-counter https://notepad-plus-plus.org/community/topic/12967/replace-string-across-multiple-files-and-increment-value
  • How to insert [Path+Filename] into the Notepad text ?

    Locked
    4
    2 Votes
    4 Posts
    4k Views
    Elodie CEMOIE

    Thank you very much !

  • Finding multiple lines in multiple files and deleting just those lines

    26
    0 Votes
    26 Posts
    9k Views
    Steve Wilson105S

    Like I said, I understand MUCH better what the regex is supposed to do and is doing. This is the regex I’m using:
    (?i)^.?(<font.?|\sync.?correct|www.|.(?=Help other users)|please rate|Professional Translation|advertise your|== for|WWW.MY-SUBS.COM|SLY@Moon|subXpacio|www.opensubtitles.org|Open Subtitles MKV Player|Subtitles by|Synchr:AA|Support us and become VIP|to remove all ads|AmericasCardroom|.(?=Synced and corrected by BLuk)|Subrip by|million dollar).?\R

    It works flawlessly. If I run this regex on a directory of files and some of the files have consecutive lines listed for removal in the regex, I’ll get a message at the end like “Replace in Files: 26 occurrences replaced”. If I run the regex until it says “Replace in Files: 0 occurrences replaced”, all of the lines (including the multiple consecutive lines) will have been replaced. Except - occasionally there will be multiple consecutive lines at the very end of the subtitle I’m editing. In those instances, the very last line won’t have been removed. I can solve that fairly simply by loading every subtitle into NP++ and just making sure that there’s a blank line (simply a CR/FL) for the last line. I’ve tried to create a regex to do just that, but they aren’t working. It’s not a huge deal - this is MUCH better and I’m very appreciative, but if what I’m looking for is a trivial thing and anyone has suggestions they’d be very welcome.

    As always, thanks very much

  • You cannot receive donation?

    Locked
    1
    0 Votes
    1 Posts
    438 Views
    No one has replied
  • Convertxt macro

    Locked
    2
    0 Votes
    2 Posts
    646 Views
    Terry RT

    Can you provide some more detail? Macros are generally created by users for their own purposes, so is it possible whom ever is asking you to do this might have more information?

    Do you know what sort of function this macro does to your file. If it changes the source data a lot then it might actually be a ‘plugin’. These are programs that users can make using other programming languages, which are then incorporated into NPP to enhance it’s usefulness.

    Terry

  • case sensive

    Locked
    2
    0 Votes
    2 Posts
    634 Views
    PeterJonesP

    I assume you want “case sensitive matching” during a Find or Find And Replace? If so, then the toggle is in the same place it’s always been: in the Find dialog, there’s a ☑ Match Case which needs to be toggled on to match case, or off to ignore case.

  • command to compile and execute code in COBOL

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    PeterJonesP

    … For example, here’s an NppExec script that I use to save, compile, and run a standalone C++ program:

    npp_save cd "$(CURRENT_DIRECTORY)" g++ "$(FILE_NAME)" -o "$(NAME_PART)" npp_run cmd.exe /k "$(NAME_PART)"

    For compiling cobol, you would use your cobol compiler rather than “g++”, and would have to format the command line appropriately; if your compiler is not in your path, you will have to do something like “c:\full\path\to\compileCobol.exe”.

    If you don’t want to also run the program when compiled, then you could just remove the “npp_run …” command from the NppExec script.

  • Delete LF

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Scott SumnerS

    @Jose-Emilio-Osorio

    You could use a negative lookbehind assertion, e.g. (?<!\r)\n

    How did you get mismatched line-endings in your file, anyway?

  • Not remembering opened NppConsole

    Locked
    2
    0 Votes
    2 Posts
    730 Views
    Claudia FrankC

    @Esteban-Julián

    you probably better asking at the NppConsole forum
    unless you find someone here using it and knows the answer

    Cheers
    Claudia

  • Replace a special character

    Locked
    6
    0 Votes
    6 Posts
    2k Views
    Jose Emilio OsorioJ

    Thanks. It works without the + and ?.

  • Remember hidden lines after unhiding

    Locked
    4
    1 Votes
    4 Posts
    1k Views
    Claudia FrankC

    @Kris-S.

    I don’t know of a plugin doing this maybe someone else does.
    Npp itself offers this functionality only if you use folding instead of hiding but
    this means your document lexer needs to support this.

    I’m currently thinking about a python script solution but this raises the question,
    about the logic when to hide, which documents should be affected …

    Cheers
    Claudia