• RegEx solution to evaluate URL string - keep only the ending

    11
    0 Votes
    11 Posts
    815 Views
    Alan KilbornA

    @JustinJudo said in RegEx solution to evaluate URL string - keep only the ending:

    I had a death of a family member recently…I have far more important things to process in my head than trying to learn…

    Yes, you do.
    I’m sorry for your loss; we all go through these things. :-(

    Perhaps you should be taking a break from everything right now, including your original need for manipulation of URL text data – how important is that in your current state? You’re bound to make mistakes with whatever you’re trying to accomplish.

    As for my comment about PeterJone’s attitude, he deleted his snarky and condescending snipet so it just looks like I’m criticizing him for no reason - but yeah it certainly was there… he deleted it

    I suppose this IS a problem. If something is there long enough for someone to respond based on it, it should not be deleted or changed, lest further respondents draw potentially false conclusions. BUT… having read Peter’s posts here for years and years, I have a hugely hard time believing that anything he said was all that offensive.

    A LATER EDIT: After reading Peter’s restored-but-strikethrough posting parts, assuming they are legitimate (but I’m sure they are), there’s nothing there that should have caused a flap of the magnitude that ensued. Let’s chalk it up to the OP having a bad day (or series of days/weeks when you have a death of someone close) when he wasn’t fully in his right mind.

    Oh, well, let’s get back to Notepad++ business.

  • Need to replace a line feed character in column 86

    4
    1 Votes
    4 Posts
    245 Views
    CoisesC

    @Mark-Boucher said in Need to replace a line feed character in column 86:

    the line feed LF character in column 86 (after MM/YY before *01)

    If the pattern is consistent that you have one or two digits, a diagonal, two digits, a line break, and “*01” at the beginning of the next line, then just select Search | Replace… from the menu, enter:

    Find what : (?<=\d/\d\d)\R(?=\*01)
    Replace with : a single space
    Search Mode: Regular expression

    and use the Replace All button.

    If that gets other sorts of lines that you didn´t want wrapped, then it can be refined, or you can use the counting characters method @Mark-Olson explained.

    @Mark-Boucher said in Need to replace a line feed character in column 86:

    To accomplish this, I have tried using the Begin/End Select in Column Mode

    Rectangular selections won’t work for this, for a couple of reasons. For one thing, you can’t select or change line endings using rectangular selections. In addition, you’re not just selecting the long lines, you’re also selecting “virtual space” past the end of the short lines.

  • Doesn't print correctly (was: No imprime correctamente)

    Moved
    4
    0 Votes
    4 Posts
    298 Views
    PeterJonesP

    Moderator Note: this topic was renamed to its English equivalent (to make searching by topic name easier), and moved from the “Notepad++ & Plugin Development” to “Help Wanted” (because it wasn’t a question about how to contribute to Notepad++ or how to make a plugin)

  • Npp exec wrongly output program

    5
    1 Votes
    5 Posts
    394 Views
    Vitalii DovganV

    I was considering to add a FAQ to the NppExec Manual in 2017, in the times of NppExec v0.6 alpha 1.
    Well, finally, it happened :)

    https://d0vgan.github.io/nppexec/NppExec_Manual/FAQ.html

  • How to show the special characters?

    7
    0 Votes
    7 Posts
    28k Views
    mkupperM

    @sadicus said in How to show the special characters?:

    How to show the special characters?
    I’m not even sure if that’s whats neede, but not understanding what else is causing spaces between words.
    in this case editing a “New Doc Sizes.psp” file.
    When Photoshop reads the psp file, it displays correctly with no space.
    In Text Edit, it displays with several spaces between the words.

    If the goal is to sort the list of settings then sort and save the file (make a backup first). If Photoshop is happy with your sorted file then you are done. The exact nature of the spaces would remain a mystery.

    If you want to know what those spaces are then I think it would help if you were to copy paste the lines for CardRack and MayaShelf into the forum thread as your reply. Put a line with three back ticks before your example lines another line with three back ticks afterwards like this:
    ``` txt
    “Card   Rack”, …
    “Maya   Shelf”, …
    ```

    The problem is that while we can walk you through various ways to show special characters in Notepad++ the results will vary depending on what invisible characters you are dealing with. If you do the three back ticks thing as shown above then hopefully we all will be able to figure out what the invisible characters are and can provide better directions on what settings or features to use if you want those things that look like spaces to be clearer to you when looking at the file in Notepad++.

  • Notepad++ on Macs

    5
    0 Votes
    5 Posts
    2k Views
    mkupperM

    @YukiYasha said in Notepad++ on Macs:

    What prevents us from deploying it on Mac OS?

    Nothing prevents you or anyone from writing an application called Notepad++ for the Mac. Notepad++'s source code is available and is licensed so that you can look at and use it.

    The developer of Notepad++ for Windows has chosen to focus their entire attention on Windows and has tuned Notepad++ to work well within Windows.

    Internally, Macs and Windows are very different.

    Someone who wants to use the Notepad++'s source code to create a Mac version will be faced with that 100% of the code and data structures is tuned for Windows. Let’s start with something that seems basic and simple, which is the keyboard. Macs and Windows machines do not have the same set of keys. They also use very different data structures and key codes. Windows was designed to work well with IBM PC style keyboards. 40 years later Windows and applications such as Notepad++ are still very much oriented around how IBM PC style keyboards work.

    If you are writing a Notepad++ for the Mac do you spend time figuring out how to map what you get from a Mac’s keyboard into Windows style keyboard events, data structures, and scan codes or do you want your text editor for the Mac to be efficient and to use Mac style logic within your editor? These decisions will happen over and over for every single aspect of Notepad++'s Windows centric code.

    Rather than attempting to rework Notepad++'s code to be native for the Macintosh it is much easier to Google for Notepad++ for the Mac. There are over eight million hits. It looks like TextWrangler used to be a popular text editor for the Mac. Apple broke TextWrangler with an update to MacOS. The developers of another text editor for the Mac, BBEdit, added some TextWrangler features.

  • Always open file in last tab

    7
    0 Votes
    7 Posts
    945 Views
    Alan KilbornA

    @Jeff-Schindler said in Always open file in last tab:

    A preference for this behavior would be awesome (“Always move opened files to last tab”).

    You’d have to make a feature request; see HERE for how to do that.

  • how to updaet the Meta Name = Desc. as it is blank on my website.

    2
    0 Votes
    2 Posts
    163 Views
    Terry RT

    @Camille-Hinkle said in how to updaet the Meta Name = Desc. as it is blank on my website.:

    so the question is as the owner of the domain and website, can i make this change myself and if YES how?

    What makes you think that users of the Notepad++ application will (should) answer this question? You should be looking at the provider of your website for solving this.

    Terry

  • Is this normal behavior for this program? How do I disable these features?

    18
    1 Votes
    18 Posts
    1k Views
    Lycan ThropeL

    @ErolB1 said in Is this normal behavior for this program? How do I disable these features?:

    Maybe there needs to be a “Frequently Altered Preferences” (FAP) list, analogous to an FAQ.

    There already is…it’s called the online manual. :-) However, just like the manual most people don’t read the FAQ’s either, rather they post here for instant answers. It’s the Google generation. If there was a world wide power outage tomorrow, only the old “dinosaurs” would know how to actually research answers, while the rest would be twiddling their thumbs not knowing how to find information that wasn’t available prior to the web. It’s called, ‘hard copy’. :-)

  • Unable to use updated Notepad++

    3
    1 Votes
    3 Posts
    204 Views
    PeterJonesP

    @PeterJones said in Unable to use updated Notepad++:

    Despite that, I upvoted you so you won’t have difficulty replying

    I may regret my effort… Your profile makes you appear to be a spammer. If you post anything remotely spamlike, rest assured you will be banned quite promptly. Good luck.

  • Help with NUL in dll file

    3
    1 Votes
    3 Posts
    619 Views
    mkupperM

    @Joshua-Rowsom You are in a somewhat dark small wooden cabin that has been used to store cloth bags of gunpower for decades. There is gunpower dust all over the place. Sunlight is streaming through a small window and you can see there is also a lot of dust in the air.

    You have a box of matches.

    What do you do?

    Editing DLL files is much like playing with a box of matches in this cabin.

    The message you saw probably looked like what is below though I’m puzzled that you would get this for a DLL file unless you were playing the game at the time you were editing the file and the game is making changes to the DLL.

    --------------------------- Reload --------------------------- "c:\the\path\to\your\dll\file" This file has been modified by another program. Do you want to reload it and lose the changes made in Notepad++? --------------------------- Yes No ---------------------------

    When you make changes to a file using Notepad++ then your changes are not immediately saved to the file you are working on. If someone or something else makes changes to the file at this point then you will see the warning notice about “This file has been modified by another program.” Your choices are:

    Clicking “Yes” means that you intend to abandon the changes you had made within Notepad++ to the file. Notepad++ will reload the file so that you are seeing the current version of it. Clicking “No” means that you intend to continue working on the file in Notepad++. If you then save the file then you will be overwriting whatever changes that other program made.

    When I get the “This file has been modified by another program” message and I was not expecting it then I usually select “No” but then Save-As the file I’m working on to a new name. I then compare the original file against the copy I just saved. That way I can see the changes someone or something else made vs. the changes I made and based on that decide if and how to update the original file.

    Of course, none of that helps you with the NUL in dll file question though @PeterJones answer looks good.

  • Notepad++ writes a lot to disk after closing

    7
    0 Votes
    7 Posts
    395 Views
    mkupperM

    @abracadabruh1 said in Notepad++ writes a lot to disk after closing:

    Resource Monitor,

    Resource Monitor displays the number of bytes per second. This is unrelated to the number of bytes written. For example, if it takes you one millionth of a second to write one byte then Resource Monitor says you are writing at one million bytes per second.

    Other tools such as Microsoft’s Sysinternals procmon can better show you which files an application is writing to and the number of bytes in each write. Unfortunately, procmon is not perfect as ideally what we want is a nice list of the files written to and the total bytes written.

  • Two search boxes each View

    5
    2 Votes
    5 Posts
    390 Views
    mkupperM

    @Michael-Döring said in Two search boxes each View:

    My question is whether I can keep a search box each view in parallel. I often have to search for separate things in both views and it would be a great relief if I didn’t have to type everything twice every time.

    One option is to take advantage of Notepad++'s bookmarking feature. Use Ctrl-M to pull up the Mark dialog box and enable the Bookmark line checkbox. Do the first search as a “Mark”.

    Switch to the Find tab and enter the second pattern you want to search for and do the search.

    Close the find/Replace/…/Mark box.

    Now you can use the F2 function key to jump to the next bookmarked line (the first pattern you searched for) and the F3 function to jump to instances of the second pattern. Shift+F2 and Shift+F3 both work and will go to the previous pattern 1 or pattern 2 as desired. Ctrl-F2 will toggle bookmarks on a line. I like this as I can do a mark to bookmark lines in a file I. As I then visually inspect the lines and if I no longer need to deal with that item I do Ctrl-F2 to switch the bookmark on that line off. The marked highlighter makes it easy for me to see where on the line my search had matched.

    Also, I don’t know if you are aware that the Find what field in search box is a drop down list of the most recent searches. Click the ˅ down arrow at the right side of the Find what field. You don’t need type everything twice but instead can pick out recent things you have searched for from the drop down list.

  • 0 Votes
    10 Posts
    7k Views
    Mark OlsonM

    @guy038
    Your regex is better if everything is quoted, but that’s not really what I meant.

    In most CSV files, a column is only wrapped in quotes if it contains the separator or a newline.

    3223309f-ecd6-4839-adbd-c3ff8c9fe1db-image.png

    In the above example (pretty colors courtesy of CSVLint), most columns aren’t wrapped in quotes except column 3 of row 5 and column 2 of row 6. The other part of my regex is the (?:[^"]|\\")* alternation inside the quotes, which is necessary to allow an escaped quote character to be present inside quotes.

    Using my column regex (?'column'(?:(?!")(?:(?!\r\n)[^,])*(?<!")|"(?:[^"]|\\")*")) converts

    nums,names,cities,date,zone,subzone,contaminated nan,Bluds,BUS,,1,b,FALSE 0.5,dfsd,FUDG,12/13/2020 0:00,2,c,TRUE 1.2,qere,GOLAR,,3,f,TRUE 3.4,flodt,"comma,in \"column\"",,4,q,FALSE 4.6,"newline in column",QUZ,10/17/2014 0:00,5,"",TRUE 7,Unyir,MOKJI,5/11/2017 0:00,6,i,TRUE

    to seven lines of a,b,c,d,e,f,g as expected.

  • Possible pattern to skip some numbers

    2
    2 Votes
    2 Posts
    170 Views
    Alan KilbornA

    @CodeNameLin said in Possible pattern to skip some numbers:

    edit in bulk

    I suppose you have to say more about what this means, before someone can provide a good answer.

  • 3 Votes
    3 Posts
    192 Views
    Bill MillerB

    @Coises said in Is there a way in version 8.5.8 to remove the line number column down the left side of the page? I find it to be very visually intrusive and unnecessary.:

    Coises
    @Bill Miller
    about an hour ago

    @Bill-Miller said in Is there a way in version 8.5.8 to remove the line number column down the left side of the page? I find it to be very visually intrusive and unnecessary.:

    Is there a way in version 8.5.8 to remove the line number column down the left side of the page? I find it to be very visually intrusive and unnecessary.

    Settings | Preferences… | Margins/Border/Edge | Line Number

    Uncheck Display.

    I’m glad Word Wrap worked. We’ll give you an upvote so you have reputation. I think there is work in progress to fix that limitation when it comes to replying — others who stumble on this can avoid it by removing the pre-filled quotation and just writing new reply text.

    You’re my hero Coises. Thank you for riding in to my rescue once more.

  • Setting Right Side Margin

    3
    1 Votes
    3 Posts
    712 Views
    Michael VincentM

    @Bill-Miller

    From the menu:

    View => Word wrap

    Otherwise, what you are asking is not really possible in a text editor. Try a word processor instead.

    Cheers.

  • -1 Votes
    4 Posts
    535 Views
    Alan KilbornA

    @guy038 said :

    SEARCH (?s-i)^\h*BEGIN_BOUNDARY((?!ABSENT_WORD).)+?END_BOUNDARY.*?$\R

    Maybe this is better without capturing into group1?, i.e. :

    SEARCH (?s-i)^\h*BEGIN_BOUNDARY(?:(?!ABSENT_WORD).)+?END_BOUNDARY.*?$\R

    Also, OP said nothing about what comes before the word that begins the block nor what comes after the word that ends the block (assumption is the begin-word and the end-word are different) so thus maybe this is an even better expression:

    SEARCH (?s-i)BEGIN_BOUNDARY(?:(?!ABSENT_WORD).)+?END_BOUNDARY

    It’s a pity the OP never returned to either provide more specifics (and sample data) or to say whether or not the originally proposed solution was successful.

  • Need help with regex for XML removal

    11
    0 Votes
    11 Posts
    999 Views
    Alan KilbornA

    @guy038 :

    Interesting. I hadn’t thought of it as any sort of “general” solution to a problem!

    [ But, really, there already was the makings of a general solution to half of the problem, from you (ref. HERE) ]

    A couple of notes:

    Note 1:

    IF RR = ?1$0:, the complete BSR…ESR sections, WITHOUT the FR string, are deleted

    In this variant of the replace expression, the : isn’t necessary, thus:

    IF RR = ?1$0, the complete…

    Note 2:

    Since the overall regex uses group1, it isn’t available in the BSR, ESR, FR and even the RR subexpressions.

    Thus a user of this would have to keep in mind that if he is using further grouping inside these expressions, that he has to think in terms of group2 and above.

    This is definitely unlike another templated regex solution I use a lot, ref. HERE, where the user does not have to keep this in mind.

  • Regex to Find Consecutive Uppercase Letters

    5
    0 Votes
    5 Posts
    597 Views
    Alan KilbornA

    @Dick-Adams-0 said in Regex to Find Consecutive Uppercase Letters:

    I didn’t realize the case sensitivity flags had that effect

    A number of people have argued that for regex the Match case checkbox shouldn’t apply, and, unless the (?i) flag is used in the regex, that all regexes should be case sensitive.