• 0 Votes
    2 Posts
    32k Views
    guy038G

    Hello Stephen,

    In my opinion, Stephen, you didn’t understand, exactly, the use of the . matches new line option. By default, with the regex engine of N++, the special character dot . matches ANY character DIFFERENT from the 3 characters, below :

    The New Line character, displayed as LF, = \n ( \x0a )

    The Carriage Return character, displayed as CR, = \r ( \x0d )

    The Form Feed character, displayed as FF, = \f ( \x0c )

    So, when you CHECK the option . matches new line, then the dot matches, absolutely, ALL the characters of a file. This option allows the user to build multi-lines searches.

    For instance, the regex 123.*789 with the .matches new line set, tries to match the longest string, from a first occurrence of 123 to the last occurrence of 789, in the current file, even though the string 789 is located some lines after the string 123 :-)

    So, as you can see, this option has no relation, at all, with the search of spaces, anyway !

    To achieve your S/R ( Multiple spaces -> ONE space ), that’s quite easy :

    SEARCH = +, with TWO spaces before the + sign and REPLACE = ONE space

    The search regex matches a single space, followed by a non null sequence of spaces. An other syntax would be :

    SEARCH = \x20\x20+ and REPLACE = \x20 ( decimal number 32 = hexadecimal number 20 )

    You could also use a look-behind to detect the first space :

    SEARCH = (?<= ) +, with a space after the = sign and before the + sign and REPLACE = Nothing.

    However, due to a bug of the regex engine, you must click on the Replace All button, ONLY. Don’t use the Replace button, for the S/R, just above.

    Best Regards

    guy038

    P.S. :

    You’ll find good documentation, about the new Boost C++ Regex library, v1.55.0 ( similar to the PERL Regular Common Expressions, v1.48.0 ), used by Notepad++, since its 6.0 version, at the TWO addresses below :

    http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

    http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html

    The FIRST link explains the syntax, of regular expressions, in the SEARCH part

    The SECOND link explains the syntax, of regular expressions, in the REPLACEMENT part

  • Maybe 2 bugs

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    jonandrJ
    It’s possible that the file is exactly the same whether or not it’s encoded as ANSI or encoded as UTF-8 without BOM. I.e a file containing the single letter “a” encoded as ANSI will consist of the single byte 97. If you encode it as UTF-8 without BOM the file will still just consist of the single byte 97. In these cases it’s not possible to tell the encodings apart when re-opening the file.
  • national characters missing on windows 8.1

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    jonandrJ

    Which version are you using? For some versions now the default font has been Source Code Pro, maybe it doesn’t support these Lithuanian characters. Try the absolute latest version (6.8.2) which removes Source Code Pro.

    Have you tried changing the character set manually? See Encoding -> Character sets -> Baltic.

    A while back N++ started trying to autodetect the character encoding, it might work better if you switch this off (Settings -> Preferences -> Misc -> Autodetect character encoding).

  • Sort text a - z

    Locked
    2
    0 Votes
    2 Posts
    130k Views
    jonandrJ

    Yes, there is such a function in the most recent versions. To get a dictionary sort (a-z), use the menu option Edit -> Line operations -> Sort lines lexicographically. There are two versions - ascending and descending.

    There are some other types of sorts as well, where it tries to convert the selected lines to numbers first before sorting.

  • jump to the function definition from function call statement

    3
    0 Votes
    3 Posts
    5k Views
    ANKUR TYAGIA

    It worked for me…thanks a lot.

  • How To Mark A Range Of Text And Delete It

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    KhunRogerK

    Never mind - found it: “Begin/End Select”

  • Windows 10 Action Center Bug

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Strange character with non english language

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Latest Version Download Link

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • Adding My Own Connection Lines

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    JimDaileyJ

    You need to add BEGIN/END REPEAT/UNTIL and WHILE/END to the open and close boxes of the “Folding in code 1 style:” box on the “Folder & Default” page. That is, add “BEGIN REPEAT WHILE” to the Open: box and “END UNTIL END” to the Close: box.

    Look at the documentation at http://udl20.weebly.com/

  • Keyword Delimiters

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    JimDaileyJ

    Try adding “(” and “)” as operators…

  • Deperatley need help

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    David BaileyD

    You will have to explain your problem in a lot more detail.

    I tried to change my previous post but I didn’t make it in 180 secs, so here is a replacement!

    What was the exact sequence of actions that you did?

    What exactly do you mean by “can’t read it” - does it display as junk?

    Find the file in explorer - does it have a suffix? These suffixes tell you what sort of application can open the file - it may not be a txt file at all, and so won’t make sense if you open it with NOTEPAD++

    David

  • Problems with the display of the Russian text in Windows 10

    6
    1 Votes
    6 Posts
    15k Views
    Максим НикитинМ

    Thanks.
    Everything worked.=)

  • 0 Votes
    1 Posts
    3k Views
    No one has replied
  • Is There A User Guide

    Locked
    3
    0 Votes
    3 Posts
    5k Views
    Frank LemmonF

    Hey Anthony, I had the same question about “How do I change the font?” After some trial and error I figured out that it’s in the Settings, Style Configurator area. There, you can set the font style for individual document types or the global default style (which will be useful for general .txt documents). In that case you must also check the “Enable global font” checkbox, too. Hope this helps, it did the trick for me.

  • How to find existing keyboard shortcuts

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Sublime Text Syntax Highlighting (PHP)

    5
    0 Votes
    5 Posts
    6k Views
    dailD

    No it is not. The way they parse text is completely different.

  • Multiple shortcut keys for same plugin command?

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • After upgrade to Win1O no spellcheck

    Locked
    4
    0 Votes
    4 Posts
    4k Views
    Right PaddockR

    Scratch prior post

    I went to plugins and installed the DspellCheck plugin - hey presto working again.

    Wonder where it went when I upgraded Win 7 to Win 10 - another unsolved mystery