• 0 Votes
    2 Posts
    2k Views
    guy038G

    Hello, Badz Tuviera,

    I’m really sorry, but I did not fully understand what you want to achieve :-(

    Seemingly, you didn’t say what are the replacement strings, for either, the word TAFUNA and the number 203, in the five digits number 42031. May be, did you mean that you want to delete them ?

    But I did understand that the first digit 4 of the number 42031 must be replaced by the digit 2 !

    So, giving your original text, below :

    UMTS U81M200LEONE 3G_Leone-4 -14.3479 -170.781 4357 28 42004 240 UMTS U81M203TAFUNA 3G_Tafuna-1 -14.3235 -170.7172 4357 80 42031 130

    Which modified text do you expect to ?

    May be, you can provide some additional examples or explanations ! As usual, when a problem is clearly defined, the solution is “half” found !

    Best Regards,

    guy038

  • Make N++ show only one text file, not 2

    3
    0 Votes
    3 Posts
    2k Views
    Gary HarveyG

    @Claudia-Frank
    Thanks. That did it. Well, I had a handful of files in the “other view” so I had to repeat it a handful of times.
    Much appreciated.

  • Right ALT key highlights menu bar items - Windows 10

    Locked
    6
    0 Votes
    6 Posts
    5k Views
    Claudia FrankC

    @Anna-Maria-Schmid

    nice to see that it has been solved - out of curiosity, did you reinstall WinCompose while npp was running?
    In other words, do you think it could be caused by @samhocevar assumptions?

    Cheers
    Claudia

  • How to remove duplicate words in a line using Notepad++?

    13
    0 Votes
    13 Posts
    18k Views
    glossarG

    One more thing:

    When this regex finds no duplicates to delete, does it delete all lines, hence is this same as with the third consecutive click? As already said, the fact that it deletes all the lines with the third click is fine, but it would be very nice and helpful if it would give the usual (and expected) info, just like others, like “0 occurrence was replaced”, instead of deleting all the lines when it founds no duplicate to delete.

    And one strange thing:

    Sometimes, after the first and second click on “replace all”, it states “1 occurrence was replaced” , but the colour of the “save icon” on the tab of the file doesn’t change to red, indicating that the files is modified.

  • REGEX: Mark/Delete the 2 second line after some word

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    Vasile CarausV

    well, guy38, nice present for me.

    thanks a lot !

    This is for you !

    https://www.youtube.com/watch?v=nPW5nfoIYf8

  • Language definition - space in comment definition

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • New Instance How?

    4
    0 Votes
    4 Posts
    3k Views
    MacNalaM

    Funny when I first tried the right-click the Move/Open to new instance were greyed out non clickable. Now they work. Ahh weele the Christ mas gremlins get everywhere.
    Thanks for the interest.

  • Problem reading diacritics after using a PDF Extract/convert software

    Locked
    9
    0 Votes
    9 Posts
    6k Views
    Vasile CarausV

    @glossar said:

    t is not even worth trying, is to turn the pdf into a dead o

    hello Glossar. Thanks for the idea with pdf to images. This is a possible good solution, but if there are many many pdf (like 200) witch I want to convert to .txt, will be very hard.

    So, I find another solution. After convert all files, I will use option “Find and Replace all in all folder”, all those symbols (like [,],) that replace the diacritics: These symbols have the same function and repeats all the time.

    ] = t
    \|á = a
    [ = s
    ~ = i

  • problem with php code in html file

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    Claudia FrankC

    @Piloto-Estrellas

    you need to understand that the browser doesn’t execute your php code, in fact the browser do only
    understand html. It’s the webserver which executes the php code and makes proper html out of it,
    which then is sent to the browser.

    Cheers
    Claudia

  • Sort a list of filenames alphabetically but grouped by their extension

    Locked
    4
    0 Votes
    4 Posts
    4k Views
    guy038G

    Hi Anu Anand Premji and All,

    Well, I’m back home and here are some explanations on the two S/R :

    The two search regex begin with the modifier (?-s) ( No PCRE_DOTALL ) that ensures that the regex engine will consider the dot special character . will match only a single standard character and not an EOL character

    Then the part, ^.+\. matches, from the beginning of the current line ^, a maximum, NON empty, of characters, till a literal dot character ( which must be escaped by an antislash character \ in order to be considered as literal ) So, if the filename would be, for instance, “abc.def.ghi.cpp”, this range would be the string abc.def.ghi

    The remainder of the search regex (.+) catches the remainder of the standard characters of the current line ( The extension part ) which is stored as group 1, due to the couple of parentheses

    In replacement, the regex \1\t\t$0 rewrites the group 1 ( The extension part ), then two tabulation characters and, finally, the searched string, that is to say the name of each file, with its extension ( part $0 )

    I preferred to use the tabulation character, instead of some spaces, because, with the tabulation character, the complete filenames look all aligned :-)

    In the second S/R the part ^.+ selects, from the beginning of each line ^, the range maximum, NON empty, of standard characters, till a non empty range of tabulation characters \t+

    As the replacement field is, this time, empty, all these characters, included tabulations , are, simply, deleted !

    Cheers,

    guuy038

  • Highlighting Start/End-Tags inside PHP-Code

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Trouble with defining a Function List entry

    11
    0 Votes
    11 Posts
    9k Views
    MAPJe71M

    @Lokathor
    I will add the Haskell parser to a future FunctionList update.

  • Setting up notebook ++

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Partially Synchronized Scrolling

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Claudia FrankC

    @Michael-Hardesty

    assign a shortcut to vertical and/or horizontal scrolling and you can toggle it.
    Settings->Shortcut mapper->Main Menu->Synchronize Vertical Scrolling (Line194)

    Cheers
    Claudia

  • How to HTML beautify ?

    Locked
    7
    0 Votes
    7 Posts
    64k Views
    Claudia FrankC

    @Florent-Pagès

    just by accident I found out that there is a plugin called tidy2.

    Maybe that’s helpful to you.

    Cheers
    Claudia

  • How to restore grouping in the 'Language' drop down?

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Lorem ipsum plugin not working

    4
    0 Votes
    4 Posts
    9k Views
    srmahmud2S

    But emmet is extremely slow, how did you make it fast @Dawid-Niepsuj ?

  • Why application that i compiled cant't work correctly?

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Claudia FrankC

    @Codingandlearning

    check if notepad++.exe and scilexer.dll are in the same folder.

    Cheers
    Claudia

  • 0 Votes
    11 Posts
    9k Views
    guy038G

    Hello, Claudia, Justin and Scott,

    Justin, in addition to the Python script and the native N++ column editor feature, here is a regex S/R equivalent :-))

    So, let’s suppose that we start with the original text, below :

    BEGINNING This is a test A line with 25 characters an another try + a COMPLETE line of 34 characters_1 END

    Open the Replace dialog

    In the Find what : field, type :

    (?-s)^(?!.{34}( |1))(.+)|^.{34}\K +

    In the Replace with : field, type :

    ?2\2 1 , with 34 SPACES, between \2 and the digit 1, that should be ADDED

    Select the Regular expression search mode

    Click, TWICE, on the Replace All button ( IMPORTANT )

    You should obtain the modified text, below :

    BEGINNING 1 This is a test 1 A line with 25 characters 1 an another try 1 + 1 a COMPLETE line of 34 characters_11 END 1

    NOTES :

    The (?-s) syntax ensures that the dot ( . ) will stand for standard characters, only !

    The ^ is the assertion beginning of line, which must be verified

    The negative look-ahead ( (?!.{34}( |1)) ) verifies if the condition NO space NOR the 1 digit, at position 35, is true. This case occurs, ONLY, on the original text, before any S/R

    So, the regex catches, first, all the standard characters ( .+ ), of any non-empty line, stored in group 2

    In replacement, as group 2 exists, it rewrites the current line, then adds a minimum of 34 spaces and the final digit 1

    When you click a second time, on the Replace all button, the left part of the alternative cannot be achieved, as the look-ahead condition is, this time, false

    So, the regex engine tries to match the right part of the alternative ( ^.{34}\K + )

    The first part ( ^.{34} ) select the first 34 characters of each line

    Due to \K syntax, this range is forgotten and the regex engine, now, matches any consecutive non-null range of space characters ( + ), from the 35th position, included

    In replacement, as the group 2 is not used any more and that the conditional replacement, ?2... , do not have an ELSE part, these space characters are simply deleted !

    REMARKS :

    The nice thing is that you may add, as many spaces, as you want, after the 34 first spaces, in the replacement field !

    And, any additional click, after the second one, on the Replace all button, does not match anything else :-))

    Cheers,

    guy038

  • Select bookmarked lines

    26
    1 Votes
    26 Posts
    23k Views
    guy038G

    Hi, abuali huma,

    Not very difficult to achieve !

    EXAMPLE 1 :

    SEARCH ^(.+)\|(.+)

    REPLACE \2|\1

    Notes :

    This first regex separates the two parts of text, before and after the symbol | , which must be escaped ( \| ) as this symbol, in search regexes, stands for the normal alternation symbol !

    The part, before the symbol, is stored as group 1 and the part, located after, is stored as group 2

    In replacement, we just reverse the order of these two groups

    EXAMPLE 2

    SEARCH ^(.+?)\|(.+)\|(.+)

    REPLACE \3|\2|\1

    Notes :

    This second regex separates the three parts of text, created by the symbol |, which are stored as group 1, group 2 and group 3

    The first part ^(.+?)\|, tries to match, from beginning of line ( ^) , the shortest non-null range of characters, till the FIRST separation symbol ( \| ), because of the lazy quantifier ( +?)

    Note that if we would have written this first part ^(.+)\|, it would have matched the string this is text number three|this is text number two. Indeed, due to the greedy quantifier ( + ), it would have matched the tallest non-null range of characters, till the SECOND separation symbol !

    Then for the two remaining parts, of the regex, (.+)\|(.+) just refer to the previous regex for explanations

    In replacement, we just perform a permutation of these three groups

    Cheers,

    guy038