• Concatenate corresponding lines from two files

    Locked
    4
    0 Votes
    4 Posts
    7k Views
    guy038G

    Hi, All,

    Regex updated and section Notes, added, on 08/22/2017 - 10.45am ( French TZ )

    Just realized that my previous regex can be extended to reorganize more than two lists !

    For instance, let’s suppose I double the complete list of family and given names, from my previous post, adding the new symbols = and _, in order to get the text, below :

    #Smith #Jones #Taylor #Brown #Williams #Wilson #Johnson #Davies #Robinson #Wright #Thompson #Evans #Walker #White #Roberts #Green #Hall #Wood #Jackson #Clarke @Oliver @Amelia @Jack @Olivia @Harry @Emily @George @Isla @Charlie @Ava @Jacob @Jessica @Thomas @Ella @Noah @Isabella @William @Poppy @Oscar @Mia =Smith =Jones =Taylor =Brown =Williams =Wilson =Johnson =Davies =Robinson =Wright =Thompson =Evans =Walker =White =Roberts =Green =Hall =Wood =Jackson =Clarke _Oliver _Amelia _Jack _Olivia _Harry _Emily _George _Isla _Charlie _Ava _Jacob _Jessica _Thomas _Ella _Noah _Isabella _William _Poppy _Oscar _Mia

    Then, the regex S/R :

    SEARCH (?-s)^#(.+)\R((?s).*?)@(.+)\R((?s).*?)=(.+)\R((?s).*?)_(.+\R?)

    REPLACE \1 \3 \5 \7\2\4\6, with a space character after \1, \3 and \5

    would return, after 20 hits, on the ALT + A shortcut ( Replace All ), the single shortened list :

    Smith Oliver Smith Oliver Jones Amelia Jones Amelia Taylor Jack Taylor Jack Brown Olivia Brown Olivia Williams Harry Williams Harry Wilson Emily Wilson Emily Johnson George Johnson George Davies Isla Davies Isla Robinson Charlie Robinson Charlie Wright Ava Wright Ava Thompson Jacob Thompson Jacob Evans Jessica Evans Jessica Walker Thomas Walker Thomas White Ella White Ella Roberts Noah Roberts Noah Green Isabella Green Isabella Hall William Hall William Wood Poppy Wood Poppy Jackson Oscar Jackson Oscar Clarke Mia Clarke Mia

    Notes :

    The first part (?-s) means that the regex engine will consider, by default, that the dot meta-character matches any single standard character, only

    Then the part ^#(.+)\R represents the first complete line, beginning with the # symbol and followed by its End of Line character(s), with part, after symbol #, stored as group 1

    Any part, of the form ((?s).*?), is the smallest multi-line range of characters ( standard or EOL ones ) till a User-symbol ( @, = or _ ) and stored as groups 2, 4 or 6

    The parts @(.+)\R and =(.+)\R represent the first complete line, beginning with the @ or = symbol and followed by its End of Line character(s), with the part, after the symbol, stored as group 3 and 5

    The last part _(.+\R?) stands for the first complete line, beginning with the _ symbol, followed by optional End of Line character(s), and the part, after the _ symbol is stored as group 7

    In replacement, the first part, \1 \3 \5 \7, rewrites each line, without its initial User-symbol, separated by a space character, as an unique line, ended by End of Line character(s)

    Then, the remaining of the four lists, \2\4\6, is, simply, rewritten, without any change !

    The table , below, marks the beginning of each of the seven defined groups :

    ----------------1-----2---------3-----4---------5-----6---------7------ SEARCH (?-s)^#(.+)\R((?s).*?)@(.+)\R((?s).*?)=(.+)\R((?s).*?)_(.+\R?)

    Cheers,

    guy038

  • Calling a plugin function from a macros

    2
    0 Votes
    2 Posts
    2k Views
  • Notepad++ Deleted all my work. (sad story)

    3
    0 Votes
    3 Posts
    2k Views
    clement muhirwaC

    I have started using sublime text, it is very nice and no such errors i would recommend you to use it too, it has never disappointed me as notepad++

  • Export NppFTP Profiles to new Computer?

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Disable language Swift

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    CasperBertelsenC

    I see. Thanks.

  • Notepad++ crashed, I lost all data in a file

    3
    0 Votes
    3 Posts
    3k Views
    Nathaniel CourtensN

    I had the same problem going on for some time now. I ended up coding within remote desktop, directly on the server instead over my workgroup internal LAN connection. Somehow that made it stop / or almost stop. Not ideal, but this was a workaround.

  • Modifying selection background color in theme

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Jim BellJ

    Never mind. I found the setting I needed.

  • Plugin Manager -

    Locked
    3
    0 Votes
    3 Posts
    5k Views
    glennfromiowaG

    @Megan-Butler Also, despite the fact that Plugin Manager is no longer installed with Notepad++, it can still be downloaded here:
    https://github.com/bruderstein/nppPluginManager/releases

  • PDU file conversion to usable english document

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • User defined functionList no working

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Andre RenardA

    SORRY, IT IS WORKING.
    But I had two versions of Notepad++ without realizing it. Removing the old one resolved this issue.

  • The procedure entry point XYZ could not be located...

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    1 Posts
    943 Views
    No one has replied
  • "Unknown exception" while running Notepad++.

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Isn't auto-saving

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Daniel FuchsD

    You need to enable that your session is retained during instances. However you will always need to save your files to disk for this to work.

  • Feature Request: ABC-Notation support

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Jim DaileyJ

    @Daniel-Mayr
    While you wait, you can use the Language->Define your language… dialog to create your own syntax highlighting.

  • How can I restore my old backup files?

    Locked
    2
    0 Votes
    2 Posts
    20k Views
    glennfromiowaG

    The simple solution is to open the files in the backup folder with Notepad++, possibly doing a Save As or Rename to put them in a different location after opening.

    Ideally, if you had also backed up the session.xml file in AppData\Roaming\Notepad++, you could theoretically restore that file also and have it restore your session. However, it’s very finicky, and if any small detail has changed (path, for example) for any file, it will simply not open that file in the session. So the more reliable solution is the simple one above.

  • 0 Votes
    5 Posts
    6k Views
    glennfromiowaG

    You can find the link under Resources on the Notepad++ home page. To get Plugin Manager, navigate to http://www.brotherstone.co.uk/npp/pm/ There are installation instructions there also, but basically, you unzip the file and copy both the plugins and updater sub-folders from the zip file to your %ProgramFiles%\Notepad++ folder.

    Also, I believe the most current version is v1.4.9. :) No, I don’t know why the most current version of the Plugin Manager is not included with the install. :( I’m on 1.4.9 and it seems to work well.

  • How to return multiple lines before and after the search term

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Scott SumnerS

    @Matthew-Hinkle

    Not natively, but you could give the LineFilter2 plugin a try. It has options to show lines before and after matches:

    Not sure if this is a downside for you or not, but it puts the results in a new editor tab window…

    If this (or ANY posting on the Notepad++ Community site) is useful, don’t reply with a “thanks”, simply up-vote ( click the ^ in the ^ 0 v area on the right ).

  • How to put word between the symbols?

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    glennfromiowaG

    @abolfazl-yaasi Thanks so much for posting a screen shot! That really helped to tell what was happening. You need to have the Regular expression selected at the bottom left of the dialog, instead of Extended.

  • Removing everything but the content of certain HTML tags

    3
    1 Votes
    3 Posts
    5k Views
    Eugene FishgalovE

    This worked well! Thank you!