• 'Find Previous' shortcut not working?

    3
    0 Votes
    3 Posts
    1k Views
    PeterJonesP

    @Alan-Kilborn said in 'Find Previous' shortcut not working?:

    backward searching for this has been (mostly) disabled due to unexpected results in certain cases.

    @Nathan-Wailes ,

    To re-enable backwards regex, see the official docs at https://npp-user-manual.org/docs/preferences/#preferences-for-advanced-users

    more issues are reported

    As I’ve said before, sometimes change is “implemented to make the majority more happy, which had the side effect of making the minority more unhappy.” – except, in this case, I’m wondering if the change wasn’t for the minority, making the majority unhappy. :-)

  • 0 Votes
    1 Posts
    125 Views
    No one has replied
  • Function List for Perl

    11
    0 Votes
    11 Posts
    924 Views
    PeterJonesP

    I haven’t had a chance to “live with it” yet, but I took @MAPJe71’s and added yuzhy8701’s attributes/prototypes

    I also allowed (\w*::)* in the function name, to handle that rare-but-valid syntax. (I decided it didn’t need a separate hierarchy, because if you’re doing it in that format, you probably aren’t thinking of it as “belonging” to a class.)

    e710e890-fb34-46e3-a56f-e790a0f7a868-image.png

    <!-- ======================================================== [ PERL ] --> <!-- PERL - Practical Extraction and Reporting Language --> <parser displayName="Perl" id="perl_function" commentExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?m-s:\x23.*$) # Single Line Comment | (?s:__(?:END|DATA)__.*\Z) # Discard up till end-of-text " > <classRange mainExpr ="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?m) # ^ and $ match at line-breaks (?'PACKAGE_HEADER' ^ # NO leading white-space at start-of-line (?-i:package\b) ) (?s:.*?) # whatever, (?= # ...up till \s* # ...optional leading white-space of (?: (?&amp;PACKAGE_HEADER) # ...next header | \Z # ...or end-of-text ) ) " > <className> <nameExpr expr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) \s \K # discard text matched so far [^;]+ " /> </className> <function mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?m) ^\h* sub \s+ (?:\w+\:\:)* # optional prefix::package::names:: \w+ (?:\s*\([^()]*\))? # prototype or signature (?:\s*\:\s*[^{]+)? # attributes \s*\{ # start of function body " > <functionName> <funcNameExpr expr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (sub\s+)? \K # discard text matched so far (?:\w+\:\:)* # optional prefix::package::names:: \w+ " /> </functionName> </function> </classRange> <function mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?m) ^\h* sub \s+ (?:\w+\:\:)* # optional prefix::package::names:: \w+ (?:\s*\([^()]*\))? # prototype or signature (?:\s*\:\s*[^{]+)? # attributes \s*\{ # start of function body " > <functionName> <nameExpr expr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?:sub\s+)? \K # discard text matched so far (?:\w+\:\:)* # optional prefix::package::names:: \w+ " /> </functionName> </function> </parser>
  • I need help with replacing different strings

    4
    1 Votes
    4 Posts
    1k Views
    Olivier ThomasO

    This is not a valid srt timecode.
    Whatever you do, it won’t work.
    00:26.369,0:00:33.450

    The correct code is as follows:
    00:00:36,833 --> 00:00:39,291

  • Very long pattern

    21
    0 Votes
    21 Posts
    5k Views
    Olivier ThomasO

    @astrosofista said in Very long pattern:

    even I upvoted your contribution

    I wish he had done it for me even though I asked him about it.
    he just wrote like this:
    If it works for you, use it. We have given you enough that you can accomplish this task.

    ((\d*[5-9]|\d+[01])\b)|([1-9]?1[2-4]\b)
    Was it not working?

    @PeterJones
    Maybe we’ll bury the war ax and smoke the peace pipe?

    If you have any questions, I will be happy to answer.

  • creare macro eliminare spazi e virgole

    3
    0 Votes
    3 Posts
    468 Views
    massimo la terraM

    perfetto grazie

  • 0 Votes
    8 Posts
    3k Views
    No OneN

    @Alan-Kilborn thank you very much for pointing that out!

  • awk mode

    2
    0 Votes
    2 Posts
    1k Views
    EkopalypseE

    @Joseph-Newcomer

    UDL has its limitations, one way to overcome those is to use a script like this.

    Is your gawk udl available for download if one wants to make some tests?

  • RegEx problems

    28
    0 Votes
    28 Posts
    2k Views
    Olivier ThomasO

    God, it can’t be,
    better not to change.

  • Encoding TXT UTF8NoBom -> UTF8

    5
    0 Votes
    5 Posts
    356 Views
    gstaviG

    Just read better the title.
    Moving from UTF8 wo/BOM to UTF8 w/BOM is not a conversion. All that need to be done is add 3 BOM bytes to the beginning of the file. Just be sure not to add them twice. So basically create a 3 byte file with BOM and do something like (I don’t remember the exact copy syntax of Windows):
    copy bom.txt+file.txt file_new.txt

    Read this to understand Unicode and encoding. You should realize that UTF8 w/BOM is a pretty stupid concept. So unless you need to feed your file into an application that requires UTF8 BOM stay with UTF8 wo/BOM.

  • עזרה בהרצה על הדפדפן

    3
    0 Votes
    3 Posts
    188 Views
    Z

    תודה רבה!

  • Template substitution from list

    2
    0 Votes
    2 Posts
    201 Views
    EkopalypseE

    @Atanvarno-Aldarion

    Yes, there is, and it’s called the PythonScript plugin.
    Probably any other scripting plugin can do this too.

    Here is an example of what it might look like.

    names = [ 'HARRY', 'RON', 'HERMIONE', ] template = ''' STUDENT {0} IS: NAME: {0} ID: 1-{0}-2 BIOGRAPHY: {0}'s biography follows. ''' editor.appendText('\r\n'.join([template.format(x) for x in names]))
  • Nested and hidden text notes

    2
    0 Votes
    2 Posts
    896 Views
    EkopalypseE

    @Michael-Eve

    Define your UDL and create folding points.

  • Mark every line contains less than 3 dots

    4
    0 Votes
    4 Posts
    284 Views
    Mohammed AsifM

    thanks, guys it worked, both of your solutions worked

  • Regex: Put a comma on REPLACE html tags

    15
    0 Votes
    15 Posts
    1k Views
    guy038G

    Hello, @vasile-caraus and All,

    In fact, I’m presently on holidays ! Thus, my concentration is not at top level ;-))

    So, here is the true story ! When using, for the second regex S/R, the simplified form :

    SEARCH (?s)<meta\x20name="keywords"\x20content="\K(\w+)|\G[^\w\r\n]+(\w+)

    The first alternative <meta\x20name="keywords"\x20content="\K(\w+) should be used first, in order to detect the first word after the string content="

    However, if before running the S/R, the caret is at a location before some non-words chars, followed themselves by some words chars, then the regex engine wrongly selects the second alternative , due to the \G syntax

    So, this new simplified syntax can be used if the initial location of the caret is on an pure empty line. Indeed, as the initial \G location must not be followed with, both, \r or \n ( \G[^\w\r\n]+...... ), this means that, necessarily, the next match will come from the first alternative of the regex, which is the correct solution !

    But, of course, this new simplified regex is, then, no related, anymore, to a previous <title>......</title> tag !

    BR

    guy038

  • Files History

    2
    0 Votes
    2 Posts
    213 Views
    Alan KilbornA

    @Kendall-DeMott said in Files History:

    it forgets the ones used a lot, and retains some of the oddball ones

    If you use them “a lot”, wouldn’t they be in the 15 ?

    Is there anyway to delete items of of the search history window?

    Not on-demand, no.

    Or a way to put often used phrases in there like favorites list, etc.

    This is kind of a frequently asked for feature.
    Sadly, no one has come up with a great idea for implementing it, or perhaps no developer has tackled it.
    I think a workaround is to keep a file tab dedicated to such “phrases”.

    Notepad ++ and Admin mode keep different search histories, it would be nice if they were synced (same).

    That seems like it would be a security breach.

  • How can change write method ?

    2
    0 Votes
    2 Posts
    159 Views
    Alan KilbornA

    @Muhammad-Al-A3sar

    We either have a case of CLICK HERE or if not that a case of CLICK HERE.

  • Fast scrolling

    1
    1 Votes
    1 Posts
    330 Views
    No one has replied
  • File too big for notepad++

    3
    0 Votes
    3 Posts
    2k Views
    Terry RT

    @Amsja-Mull said in File too big for notepad++:

    I’ve read that notepad++ is capable of handling 2gb

    Additional information can be found in some old posts:
    https://community.notepad-plus-plus.org/topic/11803/feature-request-larger-file-sizes-allowed/2

    https://community.notepad-plus-plus.org/topic/18950/file-size-problem-file-is-too-big-to-be-opened-by-notepad/6
    notes that having a file type of .txt is likely to allow a larger file to be opened than other file types which are associated with “lexers”.

    https://community.notepad-plus-plus.org/topic/16960/text-limit/16
    where it is noted that scintilla (upon which Notepad++ is built) has a hard limit of 2GB. Maybe this is what you thought would allow your 600MB file to work.

    However this is more a “theoretical” number that can NEVER be surpassed. However as I stated before the environment Notepad++ is running in and even the file type have a lot to play in how successful you will be in loading such a file.

    Good luck
    Terry

  • Find previous not working on win32 notepad++ 7.8.x

    2
    0 Votes
    2 Posts
    202 Views
    PeterJonesP

    @Sherif-Hemida ,

    It was an intentional change in v7.8.7, because find-previous doesn’t work how you think it will with regular expressions enabled. Find previous is still enabled for regular searches.

    See the instructions in the official docs for a config file change to make it work with regex, with the caveat that reverse-direction searches with regex sometimes yield unexpected results: https://npp-user-manual.org/docs/preferences/#preferences-for-advanced-users