• How to find missing element from a XML

    2
    0 Votes
    2 Posts
    2k Views
    PeterJonesP

    @ajith-k

    <Net>Seomthing</Net> <Clinician>Something</Clinician> <Net>Here</Net> <OrderingClinician>There</OrderingClinician> <Clinician>Everywhere</Clinician> FIND = (?s)</Net>\K((?!<OrderingClinician).)*?(?=(\s*)<Clinician>) REPLACE = $1$2<OrderingClinician>Was Missing</OrderingClinician> SEARCH MODE = regular expression <Net>Seomthing</Net> <OrderingClinician>Was Missing</OrderingClinician> <Clinician>Something</Clinician> <Net>Here</Net> <OrderingClinician>There</OrderingClinician> <Clinician>Everywhere</Clinician>

    This will insert the OrderingClinician between the Net and Clinician if it’s missing, and indent the same amount as the Clinician.

    ----

    Useful References Please Read Before Posting Template for Search/Replace Questions FAQ: Where to find regular expressions (regex) documentation Notepad++ Online User Manual: Searching/Regex
  • Can we make saved macros visible/hidden for file types

    2
    0 Votes
    2 Posts
    472 Views
    Alan KilbornA

    @bandusiri-kadinappulige

    It’s not currently possible, but if you’d like you could make a feature request for it, details for doing so are HERE. I doubt it would be implemented, though…just a personal feeling.

    Maybe much better would be allowing submenus under the Macro menu; then macros could be organized in various ways, including roughly what you’re asking for (although having the same macros appear in more than one submenu – for multiple file types – would be problematic).

    After some research, I found a request for submenus in existence already HERE.

  • Search and Insert new line and Increment if line is missing

    5
    1 Votes
    5 Posts
    710 Views
    Alan KilbornA

    @harry-harris

    If you need help getting started with PythonScript, you can find a bit of a quick-start HERE.

  • hex number begining with '0' and ends with 'h' style

    3
    0 Votes
    3 Posts
    269 Views
    Josip JosipovicJ

    Yes, thank you .

  • Replace when inserting

    5
    0 Votes
    5 Posts
    5k Views
    Alan KilbornA

    @vic3dexe said in Replace when inserting:

    found the bug tracker.

    It is good forum etiquette to post a link to any issue you open, that you’ve also discussed here. I will do it for you this time:

    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10769

    Also, this thread may interest you:

    https://community.notepad-plus-plus.org/topic/18715

  • Font size in menu bar

    11
    0 Votes
    11 Posts
    9k Views
    EkopalypseE

    @ai-aramchek

    thank you for sharing this with us. Does this also work under Linux derivatives with wine? And I add @Jago-Jago, as OP you are probably more interested in the matter than I am ;-)

  • Regex: Find that words that have html, but doesn't have .dot before html.

    6
    0 Votes
    6 Posts
    345 Views
    Robin CruiseR

    ok, try this solution, very good for all your example and for the 6’ case:

    SEARCH: ^(?=.*https://)(?:(?!\.html).)+$

  • Botimus p

    2
    0 Votes
    2 Posts
    192 Views
    Alan KilbornA

    @paul-horn said in Botimus p:

    rudementary level stuff but ya thanks in advance

    I don’t know what is even being asked here, but regardless it doesn’t sound like it is about Notepad++, the subject of this forum.

    So, I’m going to say that this statement you made is correct:

    so i am sure its going to sound stupid

  • 8.1.9 Dark Mode does not adapt the styles in Style Configurator

    2
    0 Votes
    2 Posts
    253 Views
    PeterJonesP

    @qmcl ,

    Themes contain both foreground and background information. You have to choose a theme that matches your own personal aesthetic for Dark Mode vs Normal Mode. That’s why there’s a “Default” theme for Normal Mode and a “DarkModeDefault” theme for use with Dark Mode.

  • Status bar to display selected word count

    6
    0 Votes
    6 Posts
    1k Views
    Alan KilbornA

    @sharkwsk

    I took the title of this thread to mean that you wanted to count the words in the current selection, but the script counts the number of occurrences of selected text throughout the entire document. Just pointing out the difference in my interpretation in case any future readers do the same.

  • How to Find the language of a document

    4
    0 Votes
    4 Posts
    407 Views
    Elodie CEMOIE

    Thank you very much:C++ is very comfortable, so I stay with it.

    Thanks again

  • Grammatical categories

    2
    0 Votes
    2 Posts
    231 Views
    Neil SchipperN

    @maría-del-mar-muñoz I can’t tell if you’re supposed to be learning about regex, or something to do with language.

    If it’s language, simply searching for ity should get you most of the way there, no?

    If you’re actually supposed to be learning regex, the expression you showed is very wrong. You need to spend some time with the docs, and play around with very simple expressions. Try including one new rule at a time to build competence. I suggest you learn what \w represents, as well as the * modifier. (I could give you more, but you’re a student, you need to study!)

  • 0 Votes
    2 Posts
    455 Views
    Alan KilbornA

    @kelsey-barnes

    I started thinking about replying but there are a lot of uncertainties. For the best help you should read and follow THIS before someone attempts to help you.

  • My API KEY

    2
    0 Votes
    2 Posts
    710 Views
    PeterJonesP

    @p-o-neill ,

    What does this question have to do with the Notepad++ editor?

    If it does have something to do with the editor, explain in detail how, and what steps you are taking in Notepad++ to see this message.

    If it does not have something to do with the editor, then this forum is not the right place for your question.

  • Erro code 2 Alguém pode ajudar?

    2
    0 Votes
    2 Posts
    433 Views
    PeterJonesP

    @odilon-jones-junior ,

    Error code 2 . Can anyone help?

    If this is an error you received while using Notepad++, you will have to be more clear – give us the ?-menu’s Debug Info, and provide screenshots if necessary, and give us enough to be able to see and hopefully replicate your problem, or at least understand where in the Notepad++ process this error is coming from.

    If this is an error that some other program generated, you will have to look elsewhere for the solution. (Please note: that is true even if you’re writing code using Notepad++, and the code you wrote gives Error Code 2, as described in our FAQ.)

  • 0 Votes
    3 Posts
    310 Views
    László BotkaL

    @ludamo-0

    Thank you, works fine.

    Winaero says
    Here you can change the font of statusbars, e.g. the Notepad statusbarfont. It will be also applied to tooltips in many apps. Note that many apps just not support this option. For example, Explorer wil ignore these font settings.

    I’ll see how it works on other places.

    It’s interesting that Notepad++ main statusbar also does not use this.

  • Join lines with specific symbol

    2
    0 Votes
    2 Posts
    792 Views
    Terry RT

    @Salamander931 said in Join lines with specific symbol:

    So basically I want to join line that starts with “\n” with previous line and I don’t want to delete this “\n” symbol. Any ideas how to do this?

    Using a regular expression in the “Replace” function we have:
    Find What:(?-s)\R^(\\n.+)
    Replace With:\1
    So search mode must be regular expression. Click on the “Replace All” button to change the entire file.

    You will see the \\ in the expression because the \ is regarded as a special character, so the additional \ escapes it, or reverts it to a normal character.

    Terry

    PS since you didn’t show the example inside of a black box (read the “read me before posting”) it’s possible this might not work. I suspect you may have leading spaces on some lines.

  • 0 Votes
    4 Posts
    4k Views
    Hellena CrainicuH

    thank you @guy038

  • Editer sur papier sans les retours de ligne

    2
    0 Votes
    2 Posts
    231 Views
    PeterJonesP

    @Michel-AUBINEAU ,

    I really appreciate notepad ++ and I use it as my PHP page editor.
    However despite all the possible settings of the ‘paper’ editions of a document, I cannot produce a ‘paper’ document which would give me:

    line numbers with the start of each line up to the width of the page (ignoring the end of lines … exceeding the width of my A4 page, maybe the first 80 characters!) by not skipping any line, so with a numbering that follow

    As the attached photo:

    sorry, your image didn’t get attached, and I don’t know that I’m fully understanding what you meant (possibly because translation software isn’t perfect). Can you try attaching the picture again? (And make sure you make it clear whether the picture is what you get or what you want.)

  • Need help with regex Chinese numbers

    4
    0 Votes
    4 Posts
    1k Views
    Bạch Lão BảnB

    @Stefan-Pendl @guy038

    Thank you, this problem finally solved :D

    New Project.jpg