• Replace only specific word within quotes in Notepad++

    6
    0 Votes
    6 Posts
    614 Views
    Phat HuynhP

    @astrosofista @Terry-R Perfect, thank you so much, it worked! Cheers.

  • v7.9.2 NPPM_SETLINENUMBERWIDTHMODE

    5
    1 Votes
    5 Posts
    212 Views
    PeterJonesP

    @PeterJones said in v7.9.2 NPPM_SETLINENUMBERWIDTHMODE:

    I’ll file a bug tomorrow

    #9338

    Thanks for the research, @Ekopalypse

  • -1 Votes
    14 Posts
    947 Views
    PeterJonesP

    @Alan-Kilborn said in SHort cut key to backward search Ignore specific path in the find in files option:

    Does the installer ask and then only install one localization (the one chosen)?

    Yes, the installer only installs one language by default (I rarely have used the installer, so I forget whether it can optionally do more)… That’s why https://npp-user-manual.org/docs/binary-translation/ says to download the additional language files yourself if you want more translations available.

  • how can i merge lines with condition ?

    7
    0 Votes
    7 Posts
    251 Views
    Hai PhamH

    @astrosofista That’s exactly what im talking about,Thank u so much,appreciate that !!!

  • UDL: Suffix Mode

    54
    1 Votes
    54 Posts
    9k Views
    EkopalypseE

    @bruh

    … and it works

    Great, if anything is unclear or I can do, let me know.

  • Problem with basic search

    6
    0 Votes
    6 Posts
    249 Views
    Keith LengK

    @Terry-R said in Problem with basic search:

    I see the “in selection” button is ticked. Whilst it looks like the text in the background is selected, is it? If wanting to search an entire document untick the “in selection” button

    @Alan-Kilborn said in Problem with basic search:

    @Keith-Leng

    So for your case it appears that you are pressing the Find Next button when this search fails? Is that correct?

    If so, you should note that when you have a selection active (like we can see in the righthand part of your screenshot, that a downward search (like you’ve set) will start looking at and beyond the highest position of the selection in the direction of the end of the file. (Interestingly, a backward search – with Backward direction ticked – behaves differently!)

    That’s why you don’t find helping in this example.

    The fact that In selection is ticked has no bearing on this search. If you’ll notice the group box around In selection and Count means that In Selection only applies to Count. So, for Find Next or Find All in Current Document…it is meaningless to have In selection ticked.

    Thanks for the replies. That was the problem. Sorry for my late reply. I didn’t get a notification.

  • Open with search

    35
    1 Votes
    35 Posts
    3k Views
    pdanesP

    @Alan-Kilborn said in Open with search:

    @pdanes said in Open with search:

    it changes in mid-stream. When I first call it, the dialog opens with “Find”, but after a while, it switches on its own to “Najít”. I haven’t (yet, anyway) taken the trouble to find out exactly when, or see if I can isolate the exact cause - I’ve been too busy just trying to get it working at all

    Well THAT is certainly strange!

    Isn’t it, though? What is happening is that only the first SendMessage call opens the dialog with “Find”. As long as the dialog stays open, and I simply put in different texts to search for and press the find button, it stays “Find”. As soon as a second SendMessage call is issued, or I manually switch to a different tab in the dialog, or I manually press ctrl/F (whether or not the search dialog is closed first), it immediately switches to “Najít” and stays that way from then on, for as long as Notepad remains open. If I completely close it, and it is opened again by the database and the search dialog is opened by the database’s SendMessage call, it is “Find” again. It seems that the very first SendMessage must bypass some initialization code. Maybe there is some other call I should issue first, some “SetInitialParameters” sort of thing, but I don’t really feel like looking for something that may not even exist. Just checking for both versions of the title works well enough. If someone who understands what’s going sees this and chimes in with some direction, I’ll fix it. If not, this works well enough.

    A little odd, but I’ve seen stranger behavior from software.

    Do they have a real Python interpreter built into Notepad? That’s some text editor.

    It isn’t exactly “built-in”. It’s a plugin. But a rather miraculous one. :-)

    So it seems. Python is probably something I should devote more time to. More and more situations are cropping up where knowing it well would be useful. At this point I can usually muddle my way to some result, but I don’t really ‘know’ the language, and I should.

  • Seettin a min. length for tab-characters

    7
    0 Votes
    7 Posts
    511 Views
    Alan KilbornA

    @glossar said in Seettin a min. length for tab-characters:

    It would be nice if we had had option about this, e.g., cancelling the tabularity/column feature, but I don’t think the developers would listen, after all, mine is just another user’s feature-wish.

    The devs will listen and respond to requests that make sense.
    Yours, however, does not.
    You don’t get to change a half-century of how things work; sorry.
    You might as well attempt to redefine how “line endings” are (good luck).

    So for the files you are looking at, someone chose to use the tab character as a delimiter between data.
    Perhaps an (unfortunate) way of doing it, that also has some lengthy history to it, and you aren’t going to be able to change that either.

    So what can you do?
    Suggest you use Notepad++'s replacement feature to replace tab characters with something more appealing.
    Perhaps you replace \t in Extended or Reg. Exp. Search mode, with -------- ?

    Or maybe @astrosofista 's suggestion of the Elastic Tabstops plugin works for you.

  • Edit just one ocurrence in all files, not all ocurrences in all files.

    17
    0 Votes
    17 Posts
    403 Views
    Terry RT

    @D-A-G-13 said in Edit just one ocurrence in all files, not all ocurrences in all files.:

    It worked perfectly,

    I’m glad we got there eventually. It was hard work though.

    If you ask any further questions please do supply examples. If the data is sensitive (confidential) then alter the data but keep the structure as it originally was. It’s very important that examples as supplied for the very reason as shown in this thread. Presumably English isn’t your primary language as it seems you didn’t understand some of the questions well enough to give complete answers. That’s why examples are very important. Generally about 5 or so lines before and using the same example lines, repeat them showing the result you were expecting to get.

    Terry

  • Add something before a specific word with regex

    3
    0 Votes
    3 Posts
    2k Views
    Robin CruiseR

    FIND: (.*)(life elsewhere)

    REPLACE BY: \1SECRET \2

  • Find&Replace in one column

    7
  • 1 Votes
    5 Posts
    335 Views
    guy038G

    Hello, @robin-cruise, @Terry-R and All,

    Why not this simplified version :

    SEARCH (?-is)2002(?=.*Michael)

    REPLACE 2012

    Notes :

    The regex searches for the string 2002 ONLY IF  , further on, in current line, the string Michael, with that exact case, can be found

    If so, it is replaced with the string 2012

    In case, the forename Michael could be located before the 2002 string, here is an improved version taking the two cases in account :

    SEARCH (?-is)2002(?=.*Michael)|Michael.*\K2002

    REPLACE 2012

    Use the Replace All button, only !

    Best Regards,

    guy038

    P.S. :

    Oh…, I’ve just seen the @alan-kilborn version which is really clever as it does not need an alternative ;-))

    So, I just added the (?-i) modifier, if necessary and the \K feature to avoid any group :

    SEARCH (?-is)^(?=.*?Michael).*\K2002

    REPLACE 2012

    Use the Replace All button, only !

  • How to open multiple urls at once?

    3
    0 Votes
    3 Posts
    3k Views
    prahladmifourP

    Hello,@Bruno-Martinha
    Please you have open multiple URLs at once to use the CMD batch script file for this and insert the command below in the batch script file:

    FOR /F %%link IN (<your text file.txt>) DO start chrome %%link

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

  • Regex: Rename Duplicate lines with <!— comments -->

    3
    0 Votes
    3 Posts
    210 Views
    Robin CruiseR

    In my case, I wanted to exchange something between the comments, and I have more comments. So, to do that I had to rename the comments so as not to change everything, and only certain comments.

  • Keyboard app please help.

    2
    0 Votes
    2 Posts
    156 Views
    PeterJonesP

    @Nightcore-AMV ,

    I believe this applies:
    https://community.notepad-plus-plus.org/topic/15958/faq-desk-you-ve-asked-your-question-in-the-wrong-place

    You seem to be asking a programming question, which is agnostic of what editor you use. This forum is about the Notepad++ editor itself, and not a general programming-q-and-a forum.

  • Replacing word between commas not included in a list of words

    12
    0 Votes
    12 Posts
    915 Views
    fred zeptF

    First of all I have to say that I’m amazed about this group and the level of competence you guys have.
    I just got the time to work on this project and here what I have found.

    @astrosofista said in Replacing word between commas not included in a list of words:

    Hi @fred-zept

    Please, try the following regex, based in the expressions provided yesterday:

    Search: ^((([^,]*),){22}(?!bianco|nero|rosso|giallo|blu|verde|arancione|grigio|viola|marrone|mimetico|beige|bordeaux))([^,]+) Replace: ${1}altri

    Have fun!

    Thanks, this seems to work on most of the lines. In some other line seems to change the value on the 21st comma rather than 22nd.
    It works on the first line, although on the second line change the word Topman, which is the brand and not the colour, rather than Pietra

    https://www.awin1.com/pclick.php?p=27397554539&a=357849&m=9606,"adidas Originals - Smanicato con 3 strisce nero",27397554539,9963546,https://images.asos-media.com/products/adidas-originals-smanicato-con-3-strisce-nero/20192202-1-black?$XXL$,"Gilet di Adidas Originals Il prossimo dei tuoi prodotti salvati Modello imbottito Collo a imbuto Logo Adidas Chiusura con zip Tasche laterali 3 strisce laterali Vestibilità classica Veste perfettamente la taglia indicata","Uomo > Giacche e cappotti > Gilet",74.95,"Asos.com IT",9606,"Men's Outerwear",171,https://images2.productserve.com/?w=200&h=200&bg=white&trim=5&t=letterbox&url=ssl%3Aimages.asos-media.com%2Fproducts%2Fadidas-originals-smanicato-con-3-strisce-nero%2F20192202-1-black%3F%24XXL%24&feedId=36675&k=1f40920a1b687eb73ed4ce4da992ec98bfaf0279,EUR,,0.00,https://www.asos.com/it/adidas-originals/adidas-originals-smanicato-con-3-strisce-nero/prd/20192202?browseCountry=IT&browseCurrency=EUR,,,EUR74.95,36675,"adidas Originals",Porpora,,25479,,,,,"74.95 €","0.00 €",,, https://www.awin1.com/pclick.php?p=27250398127&a=357849&m=9606,"Topman - Piumino smanicato riciclato color pietra",27250398127,10155883,https://images.asos-media.com/products/topman-piumino-smanicato-riciclato-color-pietra/20571492-1-stone?$XXL$,"Giacca di Topman Non oggi, per quando fa freddo Collo a imbuto Senza maniche Chiusura con zip Tasca con zip sul petto Tasche laterali Vestibilità classica Veste perfettamente la taglia indicata","Uomo > Giacche e Cappotti > Gilet",55.99,"Asos.com IT",9606,"Men's Outerwear",171,https://images2.productserve.com/?w=200&h=200&bg=white&trim=5&t=letterbox&url=ssl%3Aimages.asos-media.com%2Fproducts%2Ftopman-piumino-smanicato-riciclato-color-pietra%2F20571492-1-stone%3F%24XXL%24&feedId=36675&k=2bd6e17c0634ad74c710a431ab947d5e483b4d4c,EUR,,0.00,https://www.asos.com/it/topman/topman-piumino-smanicato-riciclato-color-pietra/prd/20571492?browseCountry=IT&browseCurrency=EUR,,,EUR55.99,36675,Topman,Pietra,,25487,,,,,"55.99 €","0.00 €",,,

    @guy038 your solution seems to work perfectly.

    @Terry-R I guess I’m in the middle of the good ones since I live in in Europe. And you are a good one for sure Terry, I’m still using your way to delete near duplicate lines.
    Thanks again.

    Thanks everyone for your help!

  • replace words between tags with regular expression

    10
    0 Votes
    10 Posts
    3k Views
    Robin CruiseR

    thank you !

  • How to fold code in a specific manner?

    5
    0 Votes
    5 Posts
    2k Views
    Trey SutphinT

    @Ekopalypse thanks for the suggestion. Unfortunately the file structure is what I would call a little “wonky”, with similar elements existing on different levels, so I don’t think defining a UDL alone won’t get me there. In any case I appreciate your response!

  • How to separate words of specific strings?

    6
    0 Votes
    6 Posts
    509 Views
    Faisal AlamF

    @guy038 thank you so much from my deep heart. I really appreciate your efforts towards an stranger like me. And i will definitely try learning from links provided by you. Thanks again.

  • How to separate two numbers from text?

    6
    0 Votes
    6 Posts
    559 Views
    Alan KilbornA

    @Ekopalypse said in How to separate two numbers from text?:

    but just thought, hey, this can be done easily without regex.

    Yes and you present a good technique, something interesting to the forum.

    those who want to give answers should be allowed to do so

    Surely, and I can’t stop them.
    Just my efforts to keep us on track, and not being a continual back-and-forth data translation service for those that don’t choose to go off and learn how to do their own, with the basics given here.