• How To Export Line & Column Coordinates to Clipboard ?

    16
    0 Votes
    16 Posts
    835 Views
    L

    @mkupper Here is a screenshot of a test I ran today of the extraction tool I’m working on :)
    [https://drive.google.com/file/d/1F8zmZpvFWtudVecKA-FCyGxjcOziYd9F/view?usp=sharing](link url)

  • Replace entire line based on first characters

    6
    1 Votes
    6 Posts
    911 Views
    guy038G

    Hello, @silvermew22, @mkupper, @mark-olson and All,

    I suppose that the following version should be better as it reduces the replacements to the syntaxes like 50.880001068115234 or 50.5 only !

    SEARCH (?-i)((?<!\\)"X"\s*:\s*50\.)(?!0,)\d+

    Replace ${1}0

    Now, in order to only get modifications, in the right "Events" array, we could use this version :

    SEARCH (?-i)(?:"Events"|(?!\A)\G)(?s:(?!\x5D).)*?\K((?<!\\)"X"\s*:\s*50\.)(?!0,)\d+

    REPLACE ${1}0

    So :

    Paste your JSON file OR the example, below, in a new tab { "Tests": [ { "Delta": 0, "EventType": "MouseDown", "Timestamp": 603, "X": 50.0, "Y": 79.61000061035056 }, { "Delta": 0, "EventType": "MouseMove", "Timestamp": 891, "X": 50.880001068115234, "Y": 41.540000915527344 }, { "Delta": 0, "EventType": "MouseMove", "Timestamp": 939, "X": 50.5, "Y": 36.61000061035056 }, ] }, { "Events": [ { "Delta": 0, "EventType": "MouseDown", "Timestamp": 603, "X": 50.0, "Y": 79.61000061035056 }, { "Delta": 0, "EventType": "MouseMove", "Timestamp": 683, "X": 50.0, "Y": 79.50000213623050 }, { "Delta": 0, "EventType": "MouseMove", "Timestamp": 891, "X": 50.880001068115234, "Y": 41.540000915527344 }, { "Delta": 0, "EventType": "MouseMove", "Timestamp": 939, "X": 50.5, "Y": 36.61000061035056 }, { "Delta": 0, "EventType": "MouseUp", "Timestamp": 1950, "X": 50.95000076293945, "Y": 6.659999850412109 } ] }

    Move the caret to the very beginning of the file ( Very IMPORTANT )

    Open the Replace dialog ( Ctrl + H )

    Untick all the box options

    Click once on the Replace All button

    Voila ! There were only 3 replacements in the unique "Events" array… and none in the "Tests" array !

    Best Regards,

    guy038

  • Remove unwanted LF in large file

    2
    0 Votes
    2 Posts
    3k Views
    Mark OlsonM

    @Joshua-Goodman
    Go to the find/replace form.

    Check the Regular expression box in the bottom.

    Find what: (?<!\r)\n
    Replace with: leave blank.

    This will remove all LF not preceded by CR.

  • wrong sintax

    3
    1 Votes
    3 Posts
    220 Views
    mkupperM

    @Altevir-Gomes said in wrong sintax:

    i need help with my sintax, i have already tried this : (?-is).+(?<=|\x20)(.+)(?=\x20-\x20EMAIL:).+
    but not work

    Try this:
    Search: (?-i)^Aprovada *\| *([^ |]*) *\| *([^ |]*) *\| *Verificação:.*
    Replace: \1\|\2

    Reading from left to right the search part does:

    (?-i) - Make this a case sensitive search so that Aprovada will not match aprovada or other variations in the letter case for both Aprovada and Verificação. ^Aprovada - Starting at the beginning of a line expect the word Aprovada. *\| * - Match zero or more spaces followed by a | followed by zero or more spaces. ([^ |]*) - This is the first capture group and will be the e-mail address. It scans/skips over everything that is not a space or |. I used * to allow the e-mail field to be empty. *\| * - Match zero or more spaces followed by a | followed by zero or more spaces. ([^ |]*) - This is the second capture group and is the name field. It too can be empty. *\| * - Match zero or more spaces followed by a | followed by zero or more spaces. Verificação: - Expect the word Verificação followed by a colon : .* match and thus delete everything else on the line.
  • Strange happenings with notepad

    2
    0 Votes
    2 Posts
    185 Views
    PeterJonesP

    @Trevor-Appleton ,

    “Notepad” is a Microsoft app, which is not the topic of this forum. “Notepad++” is the superior text editor written by Don Ho and discussed in this forum.

    Based on your first sentence, I think you are really talking about the Microsoft app, not Notepad++, because it recently added the ability to do tabs, which it’s never done before, whereas Notepad++ has done tabs (unless you go out of your way to turn them off) for decades.

    If you are talking about the Microsoft app, you need to find a different place to ask your questions, because this forum is not about the Microsoft app.

    If you just mis-typed and really meant “Notepad++”, you will have to give more details about your expectations vs your “strange happenings”, including screenshots and showing your ?-menu’s Debug Info (if the app you are using has neither a ? menu nor a Debug Info action in that menu, then you are not asking about Notepad++ and your question is off topic here).

  • Not copy from clipboard by key Shift+Insert

    5
    1 Votes
    5 Posts
    1k Views
    CoisesC

    @Владимир-Беспечный
    @tseGIT
    @Paolo-Linx
    @Alan-Kilborn

    The workaround in 8.6.1 is given in this GitHub issue.

    This pull request indicates that the changes which caused this will probably be reverted in the next release.

  • UDL Background Issue?

    13
    0 Votes
    13 Posts
    474 Views
    PeterJonesP

    @Jonathon-Wisnoski said in UDL Background Issue?:

    I deleted all these before, and restarted dozens of times. But for some reason it never worked until now.

    Order of operations is significant. If Notepad++ was still open when you deleted it from the userDefineLang.xml, then when Notepad++ exited, it re-saved userDefineLang.xml when Notepad++ exited, thus undoing your supposed edit. Editing Notepad++ config files from inside Notepad++ requires following the specific sequence in the User Manual.

  • Set 'replace TAB with spaces' for user defiend language

    2
    0 Votes
    2 Posts
    152 Views
    PeterJonesP

    @Stefanius67 ,

    UDL just uses the default tab settings. It would make the most sense to be a per-UDL setting, but UDL seems to be cast in stone, without feature updates, so I live with it.

  • Help for...........

    2
    -1 Votes
    2 Posts
    147 Views
    dr ramaanandD

    @Loui-Kuperij it looks like you replaced some matter with unwanted stuff on a webpage. If you don’t have a back up, it can’t be recovered. For example, if I mess up the source codes of a webpage, I will copy it back from my pendrive/USB drive where I generally store a copy. If that is also not saved, you can go to your webpage and copy the source of the same.

  • 0 Votes
    2 Posts
    490 Views
    supasillyassS

    @jacko-png You need to disable DirectWrite to directly use those fonts, but Cascadia Mono (or Cascadia Code with programming ligatures [if DirectWrite is enabled]) will still look much better.

  • How to stop searching or replacing after a string?

    24
    1 Votes
    24 Posts
    2k Views
    mkupperM

    @dr-ramaanand I think the people on regex101 are using ChatGPT or other artificial intelligence applications to generate regular expressions.

    The expressions you get from regex101 are extremely difficult to follow do not come with any explanation of how the logic works or why certain choices were made. It’s likely that the regex101 people also have little to no idea of what the expressions do.

    That’s a large part of why using ChatGPT or other artificial intelligence applications is banned on this forum. Ideally, we call can learn from the answers we see posted on this forum.

    As I posted earlier, it would be much better for you to so stick with things you know and understand well. It’s ok to push the limits a little at times as you can learn from those. Trying to make sense of what looks like AI generated content is a waste of time.

  • Can I change how control characters are displayed?

    3
    1 Votes
    3 Posts
    267 Views
    leevih123L

    @Coises Hmm, to my knowledge the first screenshot used the exact same file as I did and just opened it in notepad, but I’ll look into that. Thank you for your help!

  • Help REPLACING content with incremental order (by +1)

    7
    1 Votes
    7 Posts
    487 Views
    Joel RodriguesJ

    @Coises

    WOW! Thank you so much!!!
    It worked beautifully!

    btw, I didn´t know your plugin so far. Thank you for sharing it for the public.

    best regards

    JR

  • how to set the font in find and replace boxes to monospace?

    2
    1 Votes
    2 Posts
    247 Views
    CoisesC

    @Ryzen-Virtual said in how to set the font in find and replace boxes to monospace?:

    It’s getting really annoying trying to write regex with a proportional font or copy pasting from the code.

    Settings | Preferences… | Searching:
    check Use Monospaced font in Find dialog.

  • FAQ Says to crosslink issues, But No Reputation?

    3
    1 Votes
    3 Posts
    155 Views
  • 0 Votes
    5 Posts
    1k Views
    CoisesC

    @Hellena-Crainicu said in Is it possible to add styles and fonts in txt files, like in Ms Word (docx)?:

    I want to know if it is possible to add styles and fonts in txt files, like in Ms Word (docx)?

    For example, I want to add BOLD, ITALIC and Color, but without formatting the text in html or another language. I mean, I don’t want to add tags like <strong> </strong> or <i> , etc

    Short answer: It is not possible.

    Longer answer:

    It is not possible, because what you would have would no longer be a plain text file. Plain text has no notion of formatting aside from a few control characters which have (relatively) agreed-upon meanings: mainly tabs and end-of-line characters. Aside from that, it’s just a stream of character codes, interpreted according to either a code page or a Unicode standard.

    (In principle, I suppose someone could define a “code page” that included control characters for color, bold, italic, font assignment and so on. No existing software would know how to interpret it, though, and most people would agree it was no longer “plain text.”)

    Files like docx have tags (or the equivalent of tags); it’s just that the program which displays and edits them interprets those tags and hides them so you see their effect instead of the tags themselves. It gives a WYSIWYG (what you see is what you get) experience, but that’s due to the editing application, not the file type.

    Contrast this with html, which you usually edit in a text editor but display in a web browser. You’re aware of the tags when you create html, but viewers don’t see them or think about them.

    Consider the form in which we type these posts. We can have italics and bold in our posts, but that’s because the forum software displays the text that way based on a simple form of tags (asterisks for italic, doubled asterisks for bold, square brackets followed by parentheses for links, and so on). We edit in plain text.

    So, no software will display colors, bold, italics and the like without some sort of tags. The tags can be so simple (markdown, like these posts) that you can easily read and write them in a text editor, or so deeply encoded (pdf) that they can neither be displayed nor edited without software specifically designed for them. But they will have to be there.

  • How to find copy and replace "quoted text" from one text file to another

    31
    0 Votes
    31 Posts
    2k Views
    Mark OlsonM

    I’m glad the OP was able to find a solution, and I appreciate the spirit of patience, exploration and iterative improvement that they and everyone else involved in the discussion exhibited throughout this whole process. I have nothing but good things to say about the OP’s attitude, but I still want to make this observation in case they are interested in further improving upon the solution:

    While 1.5 seconds to process several thousand lines of code may seem fast, the script I posted above processes several hundred thousand lines of JSON in less than a second.

    I am saying this because I believe that the OP has the personality traits of a successful programmer, and it is absolutely within their power, if they believe it is worthwhile, to learn a scripting solution that would provide better performance.

  • Function List with Bash scripts not fully populating

    12
    0 Votes
    12 Posts
    846 Views
    F

    Ah, ok thanks. I am using a newer version, but I use the portable version and keep installing over previous installs. I wondered why the regex changes I was making were having no impact,

  • How to use SCI_DOCUMENT*START*END via button?

    3
    0 Votes
    3 Posts
    192 Views
    Dean-CorsoD

    @PeterJones

    Coolio! Thanks for that info. So I didn’t know what I can also use my macros with that Customize Toolbar plugin but it works great. Another new helpfully information. Thanks again!

  • Where is Config.xml located

    3
    0 Votes
    3 Posts
    343 Views
    Gary WineyG

    Thank you very much.