• Want to change the google search to customer search.

    35
    0 Votes
    35 Posts
    14k Views
    PeterJonesP

    @Cary-Korn said:

    Unfortunately I have been unable to get any of the suggested solutions to work. I appreciate all the help. I didn’t think this would be so tough.

    If you still want help, you are going to have to be more specific than that.

    I tested my 2019-03-01T14:22:23.197Z post pretty thoroughly, and it worked exactly as I expected, passing chrome the full URL.

    So, things we will need to know in order to keep helping you:

    What browser do you want the URL to go to? Chrome? Firefox? Edge? IE? Something else? If it’s Chrome or Firefox or , we will need the full path to your browser: you should be able to right click on your browser shortcut (or, if it’s active on your toolbar, right click on the icon, then again on the application name) to get you to the Properties window, and copy the full path there. If it’s Edge or IE, we’ll use the Microsoft-special notation for accessing those browsers. 'coz microsoft. What is the exact version of Notepad++ you are using? Maybe your version is behaving differently than mine it would be easiest if you went to the menu ? > Debug Info > Copy debug info into clipboard, and pasted the results here. what exact sequence did you use when editing the shortcuts.xml? exactly how long is your URL? Did you try my exact circumstance from my 2019-03-01T14:22:23.197Z post, or did you make changes to the URL before saving the batch file? when I did that setup, making sure to save the setup, exit Notepad++, and then reload, it sent the really long URL to chrome properly if you did try this, with the DUMMY URL, how exactly did it fail? (saying “didn’t work” is so generic as to be useless for helping us help you) Did it not try to do anything? If so, where exactly did you save longurl.bat? Did you make the shortcuts.xml point to the real location of longurl.bat, or did you leave it pointing to my location for longurl.bat Did it not open chrome? Did it open chrome and try to go to the full dummy URL, and fail because it didn’t exist? This is what I would expect. In which case, I would say it didn’t fail, because that was the expected behavior. Or did open chrome, but truncate the URL?

    Once I made the batch file, it never truncated the URL on me.

    I just tried 2138 characters in the dummy URL, plus the %1 search string in my batch file, which got replaced by $(CURRENT_WORD) from Notepad++, which was the exact text longurl, and chrome tried to open that page with the full 2144 character URL; because that machine doesn’t exist, chrome told me this site can't be reached, but it actually tried to go there, and the full URL was in the browser bar. If I change my batch file to

    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "https://www.google.com/search?ie=UTF-8&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&q=%1" pause so that it’s going to a valid website (google search), a total of 2106 characters plus the search string long, plus has a pause so that a cmd.exe window stays open until you hit enter or space or something, I saw the full URL in the cmd.exe window, I saw the full URL in chrome, and chrome went to the google-search for the word (longurl) that I highlighted when I launched

    Do you see how detailed I was when trying to help you? If you are detailed when responding to our help, it will be easier for us to help you.

    Please answer all five of those questions. Also, tell me an exact path where you are willing to save longurl.bat. With those five answers (detailed), and with an exact path, I should be able to craft something that works for you. I will start with the big long dummy google search, so that you know it’s really working… but after that, depending on how much info you give, I might be able to help you convert the URL closer toward what you want in real life.

  • bold text everywhere

    Locked
    7
    0 Votes
    7 Posts
    17k Views
    Shannon SearleS

    @PeterJones

    I think I figured it out, thanks

  • Replace various lines with clipboard content (or from another file).

    Locked
    4
    0 Votes
    4 Posts
    1k Views
    guy038G

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

    As your text, William, seems to have literal headers TEXT_#####_ORIG and TEXT_#####_DEST, which clearly identifies the lines, it’s fairly easy to create the appropriate regex S/R ;-))

    So, for instance, assuming that File_A contains the text, even with indented lines, and, possibly, other non-related lines, below :

    TEXT_00001_ORIG|This is original text. TEXT_00001_DEST| An other TEXT_00002_ORIG|An original line. TEXT_00002_DEST| little story TEXT_00003_ORIG|More text. TEXT_00003_DEST| TEXT_00004_ORIG|This is TEXT_00004_DEST| just for the TEXT_00005_ORIG|example TEXT_00005_DEST| demonstration TEXT_00006_ORIG|the general TEXT_00006_DEST|

    and that File_B contains the DEST lines, indented or not, with possible non-related lines, as below :

    TEXT_00001_DEST|This is modified text. TEXT_00002_DEST|An altered line. 12345 TEXT_00003_DEST|Even more text. Some bla TEXT_00004_DEST|a small blah text for TEXT_00005_DEST|to get testing TEXT_00006_DEST|idea !

    Then :

    Open a new N++ tab

    Paste the File_A contents in this new tab

    Insert a line of, at least, 3 tilde characters

    Paste the File_B contents, right after

    Now, the new tab contains :

    TEXT_00001_ORIG|This is original text. TEXT_00001_DEST| An other TEXT_00002_ORIG|An original line. TEXT_00002_DEST| little story TEXT_00003_ORIG|More text. TEXT_00003_DEST| TEXT_00004_ORIG|This is TEXT_00004_DEST| just for the TEXT_00005_ORIG|example TEXT_00005_DEST| demonstration TEXT_00006_ORIG|the general TEXT_00006_DEST| ~~~~~~~~~~ TEXT_00001_DEST|This is modified text. TEXT_00002_DEST|An altered line. 12345 TEXT_00003_DEST|Even more text. Some bla TEXT_00004_DEST|a small blah text for TEXT_00005_DEST|to get testing TEXT_00006_DEST|idea !

    Open the Replace dialog

    SEARCH (?s)^\h*(TEXT_\d+_DEST\|)(?=\R.+\R\h*\1(?-s)(.+)\R)|^(\h*\R)*~~~*.+

    REPLACE ?1$0\2

    Preferably, check the Wrap around option

    Select the Regular expression search mode

    Click once, on the Replace All button or several times on the Replace button

    Et voilà ;-))

    You should get the expected text, below :

    TEXT_00001_ORIG|This is original text. TEXT_00001_DEST|This is modified text. An other TEXT_00002_ORIG|An original line. TEXT_00002_DEST|An altered line. little story TEXT_00003_ORIG|More text. TEXT_00003_DEST|Even more text. TEXT_00004_ORIG|This is TEXT_00004_DEST|a small just for the TEXT_00005_ORIG|example TEXT_00005_DEST|to get demonstration TEXT_00006_ORIG|the general TEXT_00006_DEST|idea !

    Just note that the line of tildes and all the subsequent characters have been wiped out, as well ! The number of replacements is the number of lines TEXT_#####_DEST of File_B + 1

    Best Regards

    guy038

    P.S. :

    Be aware that, in some cases ( great amount of data, lot of non-related text between two significant lines, with headers, ... ) this regex S/R could not work properly, and, for instance, wrongly select all file contents :-((

  • bookmarks local to files

    Locked
    5
    0 Votes
    5 Posts
    742 Views
    EkopalypseE

    @todmar13

    Maybe another approach, what about using find in all open files instead of marking the results.
    The resulting search result window would have all the hits
    and in case you need to change something a click on it would open the file automatically at the exact location.

  • Macro Selecting Search Results Text and pasting into new file

    Locked
    7
    1 Votes
    7 Posts
    2k Views
    Alan KilbornA

    @Phil-Grigg

    Not sure what your most recent posting is trying to say…

  • Delete string and next two lines and repeat ?

    Locked
    16
    0 Votes
    16 Posts
    3k Views
    Terry GaffT

    Meta Chuh, Guy038 etc.
    Many thanks indeed for your help and instructions. The first reply by Meta Chuh was exactly what I was looking for. I needed to add this expression to my existing set of macros to my shortcuts file and Guy’s explanation was much appreciated also.
    Terry

  • Find text, copy and paste to another file

    Locked
    6
    0 Votes
    6 Posts
    4k Views
    Scott PikerS

    That’s awesome!! Thank you sooo much!!

  • UCS-2 encoding problem

    Locked
    14
    0 Votes
    14 Posts
    7k Views
    Marek JindraM

    @guy038
    Thank you for the explanation. You described very thoroughly what happens.

    I think, this behavior is very good for people, who want to see a readable text and not bother with encodings. It doesn’t corrupt the characters even if you tell it to do so.
    But I think NPP is not displaying the truth to me, how the UCS-2 LE really looks like if interpreted as ANSI.

  • 0 Votes
    3 Posts
    10k Views
    Meta ChuhM

    @Aditep

    if you prefer to do all conversions manually, using your notepad++ find window, and want to find all lines with a missing cr only (for e.g. manual control purposes):

    open your find window and paste/set the following:
    find what: ^(.*?|^\r)\n
    search mode: “regular expression

  • 0 Votes
    2 Posts
    20k Views
    Meta ChuhM

    @Vishwas-Kamath

    yes, you are correct.
    the run > launch in [browser name] have been disabled for default installs, due to data security concerns if you e.g. have an infected browser on your pc.
    the activation of launch in [browser name] has been made optional.

    here’s the complete guide from @PeterJones on how to re-enable them, as well as how to additionally implement “Launch in Edge” to your run menu, in case you are using windows 10:

    @PeterJones wrote:

    The Run Menu usually contains the Launch in Firefox/Chrome/IE/Edge entries.

    They are defined in the shortcuts.xml configuration file. If you have a normally-installed Notepad++, you can edit them at %AppData%\Notepad++\shortcuts.xml; if it’s a portable, or any installation that doesn’t use AppData, it will be in the same directory as notepad++.exe itself. A caveat for editing that file: exit all instances of Notepad++ (to make sure all settings are saved); then open Notepad++ and edit the shortcuts.xml file, save and exit Notepad++. The next time you open Notepad++, the changes will have taken effect.

    Mine has Firefox and Chrome. This post shows one with Firefox, Chrome, and Internet Explorer, and explains that in the most recent versions, those entries are commented out (don’t know why, sorry). Microsoft Edge behaves differently (because Microsoft), and won’t let you just give the path to the Edge browser executable, so see this post here for how to add Launch in Edge.

    So, combining the advice from both posts:

    <UserDefinedCommands> <Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">firefox "$(FULL_CURRENT_PATH)"</Command> <Command name="Launch in IE" Ctrl="yes" Alt="yes" Shift="yes" Key="73">iexplore "$(FULL_CURRENT_PATH)"</Command> <Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">chrome "$(FULL_CURRENT_PATH)"</Command>... <Command name="Launch in Edge" Ctrl="yes" Alt="yes" Shift="yes" Key="69"> shell:Appsfolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge $(FULL_CURRENT_PATH)</Command>

    (There may be other entries in the <UserDefinedCommands> section before or after these; I just included the start-tag to tell you where in the file to add the launch-in-browser commands)

    If you know the full path to another browser that you want to use, you can add another row similar to those, but with

    <Command name="Launch in SuperSecretBrowser" Ctrl="yes" Alt="yes" Shift="yes" Key="0">&quot;c:\path\to\browser.exe&quot; &quot;$(FULL_CURRENT_PATH)&quot;</Command>

    If you want to change the shortcuts, go to Run > Modify Shortcut / Delete Command

    note: for more details, please visit the original thread >>> here <<<

  • 1 Votes
    15 Posts
    5k Views
    EkopalypseE

    gagagaggei… :-D

  • [7.6.3] Plugins Admin option not visible in menu

    Locked
    3
    0 Votes
    3 Posts
    5k Views
    VivalzarV

    Yes indeed, I’m using the portableapps.com version. With the official version, it works. The folder structure is a lot simpler too. It was easy to migrate all the settings.

    I will use this one from now on. I’ll miss the automatic update through the platform though.

    Thank you very much for your answer.

  • 0 Votes
    3 Posts
    580 Views
    Alan KilbornA

    I’m sure the file’s the OP is talking about “losing” were a bunch of “unsaved” “new \d+” files (regular expression syntax intended). Apologies if this is not the case, but it is for many others reporting similar problems. When are people gonna learn to not have a bunch of these files hanging around for a long time? Side note: Rumor has it that this situation might be made worse soon as there is a consideration for allowing “new \d+” files to be given an actual name (without giving them a user-specified path in the file system). To that I give a big: UGH!

    @Fi-Piotr said:

    What I also did - I uninstalled N++ (sorry I dont remember what was the version installed at the time of crash), and I just downloaded new version (7.6.3)

    IMO that was a really dumb step to take. But I guess, you didn’t know it.

    Sorry to be such a debbie downer (and offer nothing positive–really sorry about that) but all these stories about lost data are getting old, Old, OLD…

  • Notepad++ 7.6.3 not displaying all characterswhen show all is selected

    Locked
    3
    0 Votes
    3 Posts
    572 Views
    PeterJonesP

    I have Notepad++ 7.6.3 x64 on Windows 10.

    When I set View > Show Symbol > Show All Characters, I properly see spaces, tabs, and CRLF markings

    The spaces are the orange dots, the tabs are the orange arrows, and the CRLF are pretty obvious. :-)

    Settings > Style Configurator > Language: Global Styles > Style: While space symbol: you can set the color for the white space (space and tab) symbols, to make them more or less obvious to you, as you desire.

    Oh, wait, re-reading your post, I see that you said you already changed the coloring. Hmm, can you show screenshots? upload to imgur or similar, and embed them using syntax like ![](https://i.imgur.com/eaBbxgt.png).

    Then let us see your Show Symbol menu:

    Hold down Alt key: hit V, then arrow down to Show Symbol, then arrow right so we can see your selection there, then hit PrintScreen button. Now you can let go of Alt. Winkey+R, mspaint, Ctrl+V; crop or paint over to remove proprietary info. Upload to imgur. embed the image using the Direct Link and syntax like: ![](https://i.imgur.com/fKHFBIY.png) =
  • Delete Chinese text after comparing two XML documents

    31
    1 Votes
    31 Posts
    6k Views
    andrecool-68A

    xmlTreeNav translated into Russian language, it became much easier, was there a way to disable the duplication of the two language files. And delete the Chinese no longer need, leaving only the Chinese strings which do not exist in Russian localization. and five kinds of rows to delete.

    diff:status="modified"
    diff:status="removed"
    diff:status="below"
    diff:status="added"
    xmlns:diff="http://www.via.ecp.fr/~remi/soft/xml/xmldiff"

    Made a change from the previous regular expression.

    (\x20(diff:status|xmlns:diff)=").*?"

  • Want to set an algorithm to search

    Locked
    3
    0 Votes
    3 Posts
    690 Views
    Terry RT

    @Вадим-Белянский said:

    How can i made it?

    As an exercise that might help explain the method I outlined before.
    Say we are looking for numbers greater than 229. I have the following numbers as an example

    234
    229
    245
    1000
    199

    So the regex to mark these lines containing the numbers I want is:
    Find What:(\d{4,})|([2-9][3-9]\d)
    If you have “bookmark line” also ticked on the Mark function you will see it marks
    234
    245
    1000
    only

    This is only a simple example, the longer the number of characters the more complicated the regex becomes. Whilst it will work it is NOT the most efficient method. In english it can be likened to hitting a pin with a sledgehammer to push it in.

    Terry

  • NPP On USB For Unix

    5
    0 Votes
    5 Posts
    2k Views
    Meta ChuhM

    @Alan-Kilborn

    possible: yes
    easy: also yes

    if you prefer to download notepad++ from the ubuntu software center (which currently deploys version 7.6.3 x64),
    you just have to replace the contents of ~/snap/notepad-plus-plus/190/notepad-plus-plus with the contents of your portable notepad++ folder.
    as soon as the doLocalConf.xml is copied over from your notepad++ it will stop using %AppData% just like it does on windows.

    the only thing you have to do is to rename your notepad++.exe to notepad-plus-plus.exe because the startup script expects the exe to be called that way.

    side note: a snap install is basically a one click install of a standard wine instance, bundled with notepad++.
    all further wine customisations are the same as if you would have installed wine+npp manually.
    only the folder locations will be different, as snap installs all windows executables to subfolders within the ~/snap folder.
    but once you browse to that folder, everything in there will behave the same as in windows or a manual wine install.

  • Regex Facebook

    6
    0 Votes
    6 Posts
    911 Views
    EkopalypseE

    Well without knowing how your UTM setup looks like and most importantly why this is npp related,
    the only general advise I could provide is, create a whitelist with the allowed pages and block
    the domain facebook otherwise.

  • 0 Votes
    3 Posts
    1k Views
    Abdelrahiman SolimanA

    Thank you Mr.Peter Jones. I tried the parentheses instead of the curly braces and it compiled and run a small java application. God bless you.

  • Using latest version 7.5 64bit. How to remove duplicte Lines

    31
    -1 Votes
    31 Posts
    11k Views
    guy038G

    Hi, @scott-fredrick-smith, and All,

    OK ! Taking in account, again, my first reges S/R, of my previous post :

    So, from your original text, below :

    0 AGH111900-1 GENERATOR 1 VA111200G1 GENERATOR ASSEMBLY - TOP LEVEL 2 VA111200P1 GENERATOR ASSEMBLY - HOUSING 2 100629-042 ADHESIVE, ANAEROBIC, LIQUID RESIN 2 200-000-111-112 CONNECTOR 2 200-000-112-004 CONNECTOR CONTACT 2 A50GB0013-1 TAPE, PRESSURE SENSITIVE ADHESIVE- POLYIMIDE 2 AS3236-06 BOLT, MACHINE - DOUBLE HEX HEAD 2 MIL-PRF-7808 PERF.SPEC,LUBRICATING OIL,GR3 2 MS16996-10 SCREW, SOCKET HEAD 2 VA112719P1 GEAR RETAINER 2 VA112719P2 GEAR RETAINER 2 VA112799P2 GROMMET - T2 2 VA112799P3 GROMMET 2 VA112817G1 PLATE - IDENTIFICATION 3 VA112817P1 PLATE - IDENTIFICATION 3 3-011-001 INSULATING CMPD,ELE 3 G11257P6 PLATE-BLANK 3 K34706P1 THINNER, PAINT PRODUCTS 4 S-8 THINNER, PAINT PRODUCTS 3 TD111234 PROCESS SPECIFICATION - SERIALIZATION 2 VA113269P1 COVER - DISCONNECT ASSEMBLY 2 VA113289P1 DISC RETAINER - GEAR 2 VA113448P4 BUSHING - HEATER HOUSING 2 VA113453P1 SHIM - 0.630 OD, 0.200 ID, 0.005 THK 2 VA113453P2 SHIM - 0.630 OD, 0.200 ID, 0.005 Thick

    The following regex S/R, named A, which :

    Deletes any line which does not contain VA Drawings and is different from the level 0 line

    Deletes all the P’s and G’s, followed with digits

    SEARCH (?-is)(?!.*VA\d+|^0|^\u)^.+\R|^\d\x20{3}|[GP]\d+

    REPLACE Leave EMPTY

    So, after clicking, once, on the Replace All button or several times on the Replace button, you should get :

    AGH111900-1 GENERATOR VA111200 GENERATOR ASSEMBLY - TOP LEVEL VA111200 GENERATOR ASSEMBLY - HOUSING VA112719 GEAR RETAINER VA112719 GEAR RETAINER VA112799 GROMMET - T2 VA112799 GROMMET VA112817 PLATE - IDENTIFICATION VA112817 PLATE - IDENTIFICATION VA113269 COVER - DISCONNECT ASSEMBLY VA113289 DISC RETAINER - GEAR VA113448 BUSHING - HEATER HOUSING VA113453 SHIM - 0.630 OD, 0.200 ID, 0.005 THK VA113453 SHIM - 0.630 OD, 0.200 ID, 0.005 Thick

    Now, with this new second regex S/R, named B, below, you just wipe out all duplicates lines !

    SEARCH (?-s)^(\h+(VA\d+)\x20.+\R)(\h+\2.+\R)+

    REPLACE \1

    After clicking, once, on the Replace All button or several times on the Replace button, here is what you get. Practically, your final text !

    AGH111900-1 GENERATOR VA111200 GENERATOR ASSEMBLY - TOP LEVEL VA112719 GEAR RETAINER VA112799 GROMMET - T2 VA112817 PLATE - IDENTIFICATION VA113269 COVER - DISCONNECT ASSEMBLY VA113289 DISC RETAINER - GEAR VA113448 BUSHING - HEATER HOUSING VA113453 SHIM - 0.630 OD, 0.200 ID, 0.005 THK

    Finally, we just have to normalize the indenting spaces, after the VA drawings ( VA\d+ ) to 4 space characters. Thus, this last regex S/R, named C

    SEARCH (VA\d+)\x20+

    REPLACE \1\x20\x20\x20\x20

    Again, after clicking, once, on the Replace All button or several times on the Replace button, you’ll obtain your expected text :

    AGH111900-1 GENERATOR VA111200 GENERATOR ASSEMBLY - TOP LEVEL VA112719 GEAR RETAINER VA112799 GROMMET - T2 VA112817 PLATE - IDENTIFICATION VA113269 COVER - DISCONNECT ASSEMBLY VA113289 DISC RETAINER - GEAR VA113448 BUSHING - HEATER HOUSING VA113453 SHIM - 0.630 OD, 0.200 ID, 0.005 THK

    Et voilà :-))

    Best Regards,

    guy038

    P. S. : Next time, I could give you some explanations on these 3 regex S/R ( A, B and C ) !