• Replace all occurrences of a character between 2 words

    22
    1 Votes
    22 Posts
    2k Views
    Alan KilbornA

    @guy038 said in Replace all occurrences of a character between 2 words:

    Indeed, as meta-characters, the [ and ] must be escaped with the \ symbol to search them as literal symbols. But the [ syntax has also a special meaning, with the NodeBB Markdown language !

    Given these problems (that we usually initially forget when posting), I may consider going with this substitution instead, for any future regexes I post containing the dreaded backslash-bracket situation:

    for backslash-open-square-bracket: \x5B
    for backslash-close-square-bracket: \x5D

    Or…maybe not. :-)

  • Macro script when txt content changes

    20
    0 Votes
    20 Posts
    1k Views
    Mirko RossiM

    @Ekopalypse said in Macro script when txt content changes:

    You start the script via the PythonScript menu, BUT only once. If you call it multiple times, the macro will be called the same number of times. I should have mentioned that before, sorry.

    ahahah you are right :) The title and the interpreter are reversed twice … I should have guessed it.

    It seems to work perfectly.
    now, I just have a txt encoding problem but that goes beyond this post

    thank you all

  • Either find or skip comma(s) inside parentheses

    4
    0 Votes
    4 Posts
    332 Views
    guy038G

    Hello, @glossar, @terry-r and All,

    Some other regexes !

    To match any non-empty single-line area, between ( and ) included, not containing any ,, use the regex

    \([^(),\r\n]*\)

    To match any non-empty single-line area, between ( and ) included, containing, at least, one ,, use the regex

    (?-s)\([^(),\r\n]*,.+?\)

    To match any non-empty single-line area, between ( and ) not included, not containing any ,, use the regex

    \(\K[^(),\r\n]*(?=\))

    To match any non-empty single-line area, between ( and ) not included, containing, at least, one ,, use the regex

    (?-s)\(\K[^(),\r\n]*,.+?(?=\))

    Best regards,

    guy038

  • Paste every "say 37th line" apx..

    30
    0 Votes
    30 Posts
    2k Views
    Alan KilbornA

    @guy038

    Ok, Guy is putting on a “clinic”, in this case for “All”.
    In that case, “Nice Job!”

  • popup when cursor is placed within text

    2
    0 Votes
    2 Posts
    280 Views
    Alan KilbornA

    @Al-Kiecker

    Auto-completion popup, perhaps?

    Try the Settings menu and then select Preferences…. Then seek out Auto-Completion :

    ffc6c660-fb78-4039-bd65-f8c3e4b2e90f-image.png

  • Find One Line of Text, Then Backup the next Line Above & paste

    6
    0 Votes
    6 Posts
    2k Views
    Bill HolderB

    Thanks for all the hard work. It seems to be working, just a few minor glitches. But they are probably on my end. Will let you know more as to what I find later on.
    Again, Thanks A Lot
    Bill

  • Functionlist Changes broke my custom functions.

    3
    0 Votes
    3 Posts
    221 Views
    Pat SinclairP

    Alan:
    Thanks so much for the response.
    I am using UDL, these languages have the extensions configured etc.
    However, I took the parser and put it in like it used to be, changed the id etc…
    for instance:

    <parser displayName="p" id ="pcode.xml" commentExpr="(?m-s:;.*$)" > <function mainExpr="^DEFINE\s+\K\w+" /> </parser>

    I changed the overridemap.xml to contain the following, still no love.

    <association id= "pcode.xml" userDefinedLangName="PCODE" />

    Language definition:
    pcodelang.png
    Any tips…???
    Pat

  • [nsfw] Help extracting links from page source code

    5
    0 Votes
    5 Posts
    912 Views
    Ravi KR

    @guy038 This is exactly what I wanted. Thanks for that complex RegEx.
    No issues.

  • MISC Clickable Links is GONE! How can I turn off links now?

    4
    0 Votes
    4 Posts
    2k Views
    PeterJonesP

    @Alan-Kilborn said in MISC Clickable Links is GONE! How can I turn off links now?:

    Whenever a setting “disappears” from Notepad++'s preferences, try looking around the user-interface.

    ++

    Also, I and the rest of the npp-user-manual.org maintainers do our best to keep the manual up-to-date with the most recent Notepad++ version. The preferences doc gives a thorough description of each “page” of the Settings > Preferences dialog, and even tries to indicate when a given menu entry has been moved. If you search for “click” or “clickable”, you will quickly see where that option currently resides.

  • customizing code folding

    2
    0 Votes
    2 Posts
    269 Views
    Alan KilbornA

    The picture:

    ae4913f3-ed91-46bf-b734-b072b3be6c41-image.png

    how can i change the red color in this picture?

    You change most colors in Notepad++ in the Style Configurator, found on the Settings menu, so specifically for your case:

    9f90edc0-c8bc-4254-9d05-66618113bf4a-image.png

    Select a “foreground color” to your liking.

  • Help with FIND

    6
    0 Votes
    6 Posts
    331 Views
    guy038G

    Hi, @antonio-rosciano and All,

    However, note that the latest version of N++, as of February 26, 2021, is version 7.9.3 ! !

    BR

    guy038

  • Regex: Select everything (the whole line) to the dot but not more dots

    7
    0 Votes
    7 Posts
    4k Views
    Vasile CarausV

    thank you all !

  • 0 Votes
    4 Posts
    524 Views
    EkopalypseE

    @Jaacov-Molcho

    but not for all Hebrew characters

    but the same characters are fine directly in Npp?
    If so, it could be a problem with the font or with the rendering of the font.
    Are you already using the same font? (Change Console Font from NppExec menu!?)
    If it is a rendering problem, then I doubt it can be solved easily.

  • Hi. Can someone help me?

    2
    0 Votes
    2 Posts
    166 Views
    Alan KilbornA

    @Alexandru-Tanasa

    I think forget the browser part of the question as that is off-topic for a Notepad++ forum.

    Did you get the tab character appearing for sure in Notepad++ after your replace operation?

    Best way to tell for sure might be turning on visible whitespace by:
    View menu > Show Symbol > Show White Space and TAB

    and then tab characters will appear like this (orange arrows):

    b6ff66c4-2a0c-417e-a61a-51a0aa8de558-image.png

    But again, this may just be helping you in Notepad++.
    You will have to go elsewhere to find the answer to your browser question.

  • customize delimiter highlighting

    9
    0 Votes
    9 Posts
    2k Views
    Michael VincentM

    @mathlete2 said in customize delimiter highlighting:

    Batch

    @PeterJones

    The batch lexer is improved in Scintilla 4.4.6 which looks like it may be updated with the next Notepad++ release.

    Cheers.

  • Dual monitor with different resolutions didn't scale well with latest 7.9.3

    10
    0 Votes
    10 Posts
    4k Views
    Alan KilbornA

    @Doug-Ewell said in Dual monitor with different resolutions didn't scale well with latest 7.9.3:

    I’d like to see this as a user setting,

    I did some looking into the change in this in N++ code between 7.9.2 and 7.9.3. It’s something called a “manifest” file change. It’s a build time thing, not a runtime thing, so (with my limited knowledge) I don’t think it could be a “user setting”.

  • Search in *.txt Files for a string that's not in and add it

    4
    0 Votes
    4 Posts
    236 Views
    OdyseusO

    @Terry-R said in Search in *.txt Files for a string that's not in and add it:

    (?s-i).?Keyword=notIndexedvalue.\K|(.*\K)

    Hello Terry,
    thank you so much… Works very fine for me…

  • 0 Votes
    2 Posts
    177 Views
    guy038G

    Hello, @alexandru-tanasa and All,

    Which kind of text or literal text needs to be bold ?

    Which file type are you using ( For instance, a Markdown file with extension md )

    How you presently obtain the change of ‘some_text’ into ‘some_text’ ?

    Note : You can use the </> option to write raw text, in your next post !

    Best Regards,

    guy038

  • 0 Votes
    12 Posts
    2k Views
    Ohm DiosO

    Re: First thanks to @PeterJones, @Alan-Kilborn, @guy038. And sorry again for showing my lack of coding. I am an Electrical Engineer almost 14 years in that filed. Last few years into computer programming learning and studying on my own and one day found notepad++ after that I must say I am addicted to that. Whenever I have problems I refer forums(including notepad++) and study materials. I usually spent a lot of days for finding solution. After everything fails then only I will put my query here. From now onwards I will spend more efforts to studying and understand. @guy038 Dear sir, You are not only providing a solution, Its Love.
    Again all, Sorry for Taken your valuable times and assure you I won’t come again without 100% tried my self after studying the required materials.
    Best Regards,
    Ohm-Dios

  • Replacing a value with many different values

    5
    0 Votes
    5 Posts
    3k Views
    prahladmifourP

    Hello,@Felix-Gladitz
    Please try this command, To Replacing a value with many different values

    Take a look at Sed. You can easily achieve your goal with only one command line

    sed -e “s/Text_1/TextA/” -e “s/Text1/TextB/” <your_file.txt>your_file_new.txt

    I hope this command will be useful to you.
    Thank you.