• search and select files that contains a particular languages

    Locked
    1
    0 Votes
    1 Posts
    994 Views
    No one has replied
  • Use regex to replace backspace by underscore

    Locked
    7
    0 Votes
    7 Posts
    8k Views
    Mauricio SalazarM

    Thank you, it worked well

    Best Regards

  • 0 Votes
    7 Posts
    5k Views
    Stefan1200S

    With Notepad++ v7 I still have this problems. Can someone help fixing this? Thanks in advance. :)

  • New file on "Folder as Workspace", is that a way?

    Locked
    1
    1 Votes
    1 Posts
    1k Views
    No one has replied
  • What is plugins for v7 x64?

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • See all files in save dialog

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Scott SumnerS

    If you don’t mind tripling the amount of typing, entering this in the “File name:” box and pressing Enter seems to achieve what you want:
    *.*

    It’s really just the “All types” mask, but quicker than choosing “All types (*.*)” from the dropdown.

    Cheezy solution, I know…but I use it myself, rather often. :)

  • Suddenly hangs and my file data is erased automatically

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • What is "Open session in a new instance of Notepad++"?

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • Open with NPP from a right-click on .htm file opens file in IE

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Synchronised scrolling across all open files?

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Scott SumnerS

    How about the keyboard shortcut for moving to the end of document (default: Ctrl+End)? Sure, you’d have to do it in each document, but it is only one (quick) action…

  • Help with Notepad

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    cipher-1024C

    Menu bar -> Language -> INI file

    You will probably get faster/better responses if you include more information about what you’re trying to do.

  • RegEx Replace button doesn't work as expected with a look-behind.

    Locked
    5
    1 Votes
    5 Posts
    3k Views
    dailD

    Title updated.

  • Regex: Double your words

    13
    0 Votes
    13 Posts
    9k Views
    guy038G

    Hello Glenn,

    Oh yes, Glenn you’re thousand times right ! I should have re-read my reply, before posting ! Sorry, for being approximative !

    So, given the S/R, below :

    SEARCH : (?-s)(?:.*\R){26}\K.*(?s)(.*)

    REPLACE : String replacing line 27\1

    Updated Notes :

    The in-line modifier (?-s) forces the regex engine to consider that the dot meta-character will match standard characters, only

    The non-capturing group, repeated 26 times, (?:.*\R){26} selects the first 26th complete lines, with their EOL characters, of each file

    The \K syntax suppresses that selection and reset the regex position of search between the last EOL character of line 26 and the first character of line 27

    Then the .* part, look for all the standard characters, even 0, of the 27th line, which have to be replaced

    Then, the in-line modifier (?s), now, forces the regex engine to consider that the dot meta-character will match any character ( standard OR End Of Line character )

    So, the final part, (.*), inside round parentheses, defines the group 1, containing all the text, from the EOL characters of line 27 … to the very end of the file

    In replacement, the expression String replacing line 27 represents, the new replacement text and the \1 syntax represents the text from the EOL characters of line 27 … to the very end of the file, which must be re-written without any change !

    With that work-around, glennfromiowa, I don’t need to write \r\n, in the replacement regex, for the EOL characters of the line 27 !!

    Many thanks again, for pointing out these approximations ! Indeed, from now on, I’ll have to be careful, because some people, like you, read my posts, word after word :-))

    Best Regards,

    guy038

    P.S. :

    As I’m a moderator of the Node BB Notepad++ forum, I’m going to update my previous post, about that topic , by adding a link to that present post ! So, anyone will, easily, see the differences :-)

  • Duplicate rows according to whats in a column?

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    guy038G

    Hi Greg and Joe,

    Joe, concerning the SEARCH regex, I suppose that you meant, ( with some more star meta-characters ! ) :

    SEARCH = ^(.*?,.*?,.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?),$

    Then, with :

    REPLACE = \1,\2\r\n\1,\3\r\n\1,\4\r\n\1,\5\r\n\1,\6\r\n\1,\7\r\n\1,\8\r\n\1,\9

    it would, indeed, match the line, with 8 addresses, below

    10.16.64.0/24,ABC,Prod,10.16.64.0,10.16.65.0,10.16.66.0,10.16.67.0,10.16.68.0,10.16.69.0,10.16.70.0,10.16.71.0,

    and changed it into the block of 8 lines, below :

    10.16.64.0/24,ABC,Prod,10.16.64.0 10.16.64.0/24,ABC,Prod,10.16.65.0 10.16.64.0/24,ABC,Prod,10.16.66.0 10.16.64.0/24,ABC,Prod,10.16.67.0 10.16.64.0/24,ABC,Prod,10.16.68.0 10.16.64.0/24,ABC,Prod,10.16.69.0 10.16.64.0/24,ABC,Prod,10.16.70.0 10.16.64.0/24,ABC,Prod,10.16.71.0

    Unfortunately, if a line, of Greg’s text, has less than eight addresses, at the end, your regex would not work :-((

    But, thanks to you, you put me in the good direction and gave me an idea for getting all the work done, with ONE regex ONLY !!

    So, I start with the example text, below, which contains all possible cases, from no address to 8 addresses, after the environment field, of each line :

    10.16.64.0/24,ABC,Prod, 10.16.64.0/24,ABC,Prod,10.16.64.0, 10.16.64.0/24,ABC,Prod,10.16.64.0,10.16.65.0, 10.16.64.0/24,ABC,Prod,10.16.64.0,10.16.65.0,10.16.66.0, 10.16.64.0/24,ABC,Prod,10.16.64.0,10.16.65.0,10.16.66.0,10.16.67.0, 10.16.64.0/24,ABC,Prod,10.16.64.0,10.16.65.0,10.16.66.0,10.16.67.0,10.16.68.0, 10.16.64.0/24,ABC,Prod,10.16.64.0,10.16.65.0,10.16.66.0,10.16.67.0,10.16.68.0,10.16.69.0, 10.16.64.0/24,ABC,Prod,10.16.64.0,10.16.65.0,10.16.66.0,10.16.67.0,10.16.68.0,10.16.69.0,10.16.70.0, 10.16.64.0/24,ABC,Prod,10.16.64.0,10.16.65.0,10.16.66.0,10.16.67.0,10.16.68.0,10.16.69.0,10.16.70.0,10.16.71.0,

    The following S/R, with search mode = Regular expression, will realize everything, after clicking, ONCE only, on the Replace All button !!

    SEARCH = (.*?,.*?,.*?,)(?:(.*?),)?(?:(.*?),)?(?:(.*?),)?(?:(.*?),)?(?:(.*?),)?(?:(.*?),)?(?:(.*?),)?(?:(.*?),)?

    REPLACE = \1(?2\2)\r\n(?3\1\3\r\n)(?4\1\4\r\n)(?5\1\5\r\n)(?6\1\6\r\n)(?7\1\7\r\n)(?8\1\8\r\n)(?9\1\9\r\n)

    So, in one go, the resulting text would be :

    10.16.64.0/24,ABC,Prod, 10.16.64.0/24,ABC,Prod,10.16.64.0 10.16.64.0/24,ABC,Prod,10.16.64.0 10.16.64.0/24,ABC,Prod,10.16.65.0 10.16.64.0/24,ABC,Prod,10.16.64.0 10.16.64.0/24,ABC,Prod,10.16.65.0 10.16.64.0/24,ABC,Prod,10.16.66.0 10.16.64.0/24,ABC,Prod,10.16.64.0 10.16.64.0/24,ABC,Prod,10.16.65.0 10.16.64.0/24,ABC,Prod,10.16.66.0 10.16.64.0/24,ABC,Prod,10.16.67.0 10.16.64.0/24,ABC,Prod,10.16.64.0 10.16.64.0/24,ABC,Prod,10.16.65.0 10.16.64.0/24,ABC,Prod,10.16.66.0 10.16.64.0/24,ABC,Prod,10.16.67.0 10.16.64.0/24,ABC,Prod,10.16.68.0 10.16.64.0/24,ABC,Prod,10.16.64.0 10.16.64.0/24,ABC,Prod,10.16.65.0 10.16.64.0/24,ABC,Prod,10.16.66.0 10.16.64.0/24,ABC,Prod,10.16.67.0 10.16.64.0/24,ABC,Prod,10.16.68.0 10.16.64.0/24,ABC,Prod,10.16.69.0 10.16.64.0/24,ABC,Prod,10.16.64.0 10.16.64.0/24,ABC,Prod,10.16.65.0 10.16.64.0/24,ABC,Prod,10.16.66.0 10.16.64.0/24,ABC,Prod,10.16.67.0 10.16.64.0/24,ABC,Prod,10.16.68.0 10.16.64.0/24,ABC,Prod,10.16.69.0 10.16.64.0/24,ABC,Prod,10.16.70.0 10.16.64.0/24,ABC,Prod,10.16.64.0 10.16.64.0/24,ABC,Prod,10.16.65.0 10.16.64.0/24,ABC,Prod,10.16.66.0 10.16.64.0/24,ABC,Prod,10.16.67.0 10.16.64.0/24,ABC,Prod,10.16.68.0 10.16.64.0/24,ABC,Prod,10.16.69.0 10.16.64.0/24,ABC,Prod,10.16.70.0 10.16.64.0/24,ABC,Prod,10.16.71.0

    Et voilà ! Well, although I practised regexes, since many years, I, always, surprised by their incredible power !!

    Notes :

    If the original line is only 10.16.64.0/24,ABC,Prod,, without any address, after, the S/R just rewrites that line

    In the search regex, the 8 parts (.*?) are groups from 2 to 9, each containing a possible address, which must be rewritten, in replacement

    These 8 groups, followed by a comma, are embedded in an optional non-capturing group (?:(.*?),)? ( the group may be present [1] or absent [0] )

    At the beginning, the part (.*?,.*?,.*?,) looks for the first three fields : network, datacenter and environment, followed by a comma

    In replacement, the syntax (?#\1\#\r\n) is called a conditional replacement. It means that IF the group # exists, then it rewrites the group 1, followed by the group #, followed by the Windows EOL characters \r\n

    At the beginning, the part \1(?2\2)\r\n writes, first, the group 1. Then it writes the group 2, ONLY IF it exists ( the first IPV4 address ), and, finally rewrites the Windows EOL characters \r\n

    Remarks :

    Contrary to my previous post, with this new S/R, there is no condition, any more, about the contents of fields 2 and 3 ! They could be, for instance : 10.16.64.0/24,99999,00000000,… :-)

    Any possible leading indentation, of a line, is just kept, by this S/R !

    You can click, either, on the Replace All button AND/OR on the Replace button, for a step by step replacement :-)

    Cheers,

    guy038

  • Sorting "Folded Blocks" or "Colapsed Level 1"

    6
    0 Votes
    6 Posts
    4k Views
    Jim DaileyJ

    Back in the day we used to have flame wars over which editor was the only one worth using. Now that all right-thinking people have settled on Notepad++, I guess we can spar over the best scripting language! :-)

    Well, we could if I was of a mind to (and believe me, 25 years ago or so I would have been), but I don’t have the time or desire to care about the details any more. :-)

  • How multiply run macros without multiply run window, till end

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Sorting a Text File from certain Columns

    Locked
    2
    1 Votes
    2 Posts
    12k Views
    Scott SumnerS

    The TextFX plugin may help you.

    See the TextFX menu -> TextFX Tools -> Sort lines case sensitive (at column)
    for example.

    What you do is make a column block (Alt + Left-click, then drag) covering the lines you want sorted and have the left side of the block be in the first column you want the sort to be based upon.

  • Version 6.8.4 breaks JSLint plugin

    15
    0 Votes
    15 Posts
    12k Views
    Per SidénP

    @Manuel-Lemcke it was promising that a new version was released, but unfortunately it fails on any JSLint option and there have been no updates since. Version 0.8.1.117 distributed with Notepad++ is still the better option.

    I advice against Notepad++ distributing 0.8.3.

  • creating a form

    Locked
    4
    0 Votes
    4 Posts
    7k Views
    dailD

    As others have pointed out it isn’t natively supported out of the box.

    That being said it is kind of possible to do what you want with a plugin and/or script. You’d have to write a custom lexer to determine which parts are meant to be locked (depending on the format this may be very easy or complex). Specific Scintilla styles can be “locked”, though supposedly not perfect. The custom lexer could mark and color parts of the form as being locked vs unlocked.