• Login
Community
  • Login
  1. Home
  2. Help wanted · · · – – – · · ·
Log in to post
Load new posts
  • Recently Replied
  • Recently Created
  • Most Posts
  • Most Votes
  • Most Views
  • A

    Regex - find string and between parenthesis values

    Watching Ignoring Scheduled Pinned Locked Moved
    11 Nov 30, 2020, 8:02 PM
    Nov 30, 2020, 5:52 PM
    0 Votes
    11 Posts
    1k Views
    T Nov 30, 2020, 8:02 PM

    @Anthony-Noriega said in Regex - find string and between parenthesis values:

    I’m trying. Regex ain’t easy to learn

    Just as a suggestion. Break down your problem into smaller steps. You are looking for some text on a line, and then that line needs to return something else on the line. So we have 2 steps. The first is to identify a particular line. So that would suggest using the “bookmark” function. You could easily do that, then perhaps copy bookmarked lines elsewhere (another tab). Then you could erase all characters up until the first “(”. Then erase everything after the “)” bracket. These 3 steps are all very easy to achieve with regex. Indeed, they are in reality some of the first steps you would take in learning regex.

    If you come to us you will likely get a 1 step complete solution, and unfortunately you will find that difficult to understand and that will likely not be helpful in you learning regex.

    I always say that you have to get a good foundation in regex before attempting complicated problems, and that may also involve breaking down the problem into smaller steps so that each can possibly become a simple problem.

    And while learning, if you do have a problem that you can’t overcome we WILL help if you can provide evidence of what you have tried, even if it failed. At least we can see some intent on your behalf.

    Terry

  • A

    How can I search and replace all all text within a string, such as style="height: width:;"

    Watching Ignoring Scheduled Pinned Locked Moved
    3 Nov 30, 2020, 6:56 PM
    Nov 30, 2020, 4:21 AM
    0 Votes
    3 Posts
    164 Views
    A Nov 30, 2020, 6:56 PM

    Thank you much!

  • B

    I need to line up the lines of text from two files in a certain sequence.

    Watching Ignoring Scheduled Pinned Locked Moved
    3 Nov 30, 2020, 1:45 PM
    Nov 30, 2020, 11:49 AM
    0 Votes
    3 Posts
    163 Views
    A Nov 30, 2020, 1:45 PM

    Hi @BlackLone-Wolf

    Take a look at this thread, where you will find different ways to deal with this issue.

    Have fun!

  • E

    Can Notepad++ be made to open with a tab for every file contained in its Backup folder?

    Watching Ignoring Scheduled Pinned Locked Moved cloud backup tabs
    3 Nov 30, 2020, 9:27 AM
    Nov 28, 2020, 6:20 PM
    1 Votes
    3 Posts
    588 Views
    S Nov 30, 2020, 9:27 AM

    Notepad++ not automatically opening a tab for every file in its Backup folder.

    The Backup folder sometimes has files that don’t correspond to any open tabs. So the Backup folder is not where the session is kept!

    What you need is the actual session file. It is exported with File>Save Session..., and physically located at %AppData%\Notepad++\session.xml.
    Edit: to easily get to this file, open any folder, and in the address bar at the top, paste in %AppData%\Notepad++. Or open that link with Run.

    To get Notepad++ to use the session, this exact file needs to be synced. If OneDrive can’t do that, then you may have to symlink this file (or entire folder, even) with a place where OneDrive can put it.

    You can learn how to symlink elsewhere on the internet; it essentially makes a shortcut, except fully live and not just a file that Windows Explorer can follow to open something else.

  • N

    Deleting specific amount of lines

    Watching Ignoring Scheduled Pinned Locked Moved
    2 Nov 29, 2020, 10:57 AM
    Nov 29, 2020, 4:51 AM
    0 Votes
    2 Posts
    165 Views
    A Nov 29, 2020, 10:57 AM

    Hi @Nuke-Warrior

    Yes, I think it’s possible. Try the following regex:

    Find: (?s)^Prerequisites.*?End\R+

    Leave the replace field empty.

    Have fun!

  • D

    NPP cannot see etc\hosts file

    Watching Ignoring Scheduled Pinned Locked Moved
    4 Nov 28, 2020, 8:54 PM
    Nov 28, 2020, 10:42 AM
    0 Votes
    4 Posts
    725 Views
    P Nov 28, 2020, 8:54 PM

    @Alan-Kilborn ,

    Good point. But since OP claims to be on 64-bit NPP, then the open dialog should be showing OP the real c:\windows\system32\drivers folder, because that is the official 64-bit path name.

  • J

    use regex to change number sets

    Watching Ignoring Scheduled Pinned Locked Moved
    12 Nov 28, 2020, 6:52 AM
    Nov 26, 2020, 1:36 PM
    0 Votes
    12 Posts
    770 Views
    J Nov 28, 2020, 6:52 AM

    Terry

    thanks very much for the insight
    i will talk to the developer of the software that is used to develop the code it is still in early stages
    maybe they can incorporate some of this into the front end

    as it were as best i can describe it the program is a visual pixel by pixel generation of the artwork or knitted garment then it is compiled into the code with a compiler which creates the kcode that we were looking at
    at this moment there is no way to change the stitch size or a bunch of other parameters easily
    other than re compiling the original file with changes which are line by line
    i was just hoping without to much extra credits i could figure a way to easily edit the back end

    i have used in the past some post editing software for my cnc files which allow you to edit the back end the gcode as it were which is very simular to the k code in some aspect
    these editors were great you can adjust many actual parameters to the gcode very easily
    but this type of stuff ahs been around for a long time

    this allows you base level flexibilty if you know what your doing
    gcode is developed from cad file into a machining program ie mastercam which has a compiler with presets for your machine which outputs the gcode to move the machine around

    your idea of the bookmarks has been working great and thanks for the tipabout the red color it makes it easier to not screw it up

    thanks again for your time
    hope thing are well with you and your family in these times
    have a good weekend

  • D

    finding files using reg-ex

    Watching Ignoring Scheduled Pinned Locked Moved
    14 Nov 28, 2020, 12:21 AM
    Nov 27, 2020, 1:03 PM
    1 Votes
    14 Posts
    842 Views
    A Nov 28, 2020, 12:21 AM

    Another variant on this general theme that is handy is finding two words, in either order, with a certain degree of proximity. This way I can find, in my notes, words that I may not know the exact phrasing for, but that I know are going to be there, and be close to each other, when I need to look up something.

    So, say I want to find foo close to bar, say within 50 characters. Maybe bar occurs before foo, but maybe not. Here’s what I’d search for:

    (?s)(foo)(.{0,50}?)(bar)|(?3)(?2)(?1)

  • P

    Style Configurator font size is unreadably small

    Watching Ignoring Scheduled Pinned Locked Moved
    2 Nov 27, 2020, 7:23 PM
    Nov 27, 2020, 7:07 PM
    0 Votes
    2 Posts
    138 Views
    A Nov 27, 2020, 7:23 PM

    @Peter-Brawley

    I don’t think it is possible.
    But why don’t you paste a screenshot of it, so others can judge the “smallness”.
    Maybe it is something happening only for you?

  • BGM CoderB

    UDL Similar Delimiters

    Watching Ignoring Scheduled Pinned Locked Moved
    6 Nov 27, 2020, 6:03 PM
    Nov 25, 2020, 7:19 PM
    0 Votes
    6 Posts
    558 Views
    P Nov 27, 2020, 6:03 PM

    @BGM-Coder ,

    Sorry. I cannot force the developers to update UDL. There are plenty of issues requesting updates – and you can feel free to add more – but there seems to be a lack of interest in working on that component. (My thought has been for years now that the developer has an idea that he’ll write a new/better UDL system “some day”, but that he keeps getting distracted with general maintenance and other, easier-to-implement features.)

    In theory, someone who had the skills could write a custom plugin-based lexer, similar to the GEDCOM Lexer available in Plugins Admin, which could handle your specific needs. Or, even better, someone could write a plugin-based lexer to basically replace the UDL system, but with more powerful syntax (full regex and full unicode support in every field).

    I don’t have enough of the right skills, or the time, to devote to something that major, unfortunately.

  • Steve TS

    Function List no longer works

    Watching Ignoring Scheduled Pinned Locked Moved
    16 Nov 27, 2020, 2:03 PM
    Nov 20, 2020, 4:58 PM
    1 Votes
    16 Posts
    5k Views
    donhoD Nov 27, 2020, 2:03 PM

    FYI:
    https://github.com/notepad-plus-plus/notepad-plus-plus/commit/814e6591b5c37da7c6d84c4b67a6e73d645a318f

  • Frank HagerF

    No colours on highlighting

    Watching Ignoring Scheduled Pinned Locked Moved
    3 Nov 27, 2020, 4:07 AM
    Nov 26, 2020, 10:29 AM
    0 Votes
    3 Posts
    445 Views
    prahladmifourP Nov 27, 2020, 4:07 AM

    Hello,@Frank-Hager
    Please follow these steps, To No colors on highlighting
    Step 1: Go to settings -> Style Configurator.
    Step 2: Select the language that Notepad++ has chosen, usually based on filename extension. You can also change this manually under the Language menu setting.
    Step 3: Go through the Styles until you find the style that applied the highlighting. You can tell because the Background colour will match the highlighted color.
    Step 4: Change the Background color to white.

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

  • JP RoyJ

    Arduino language support

    Watching Ignoring Scheduled Pinned Locked Moved
    6 Nov 26, 2020, 7:32 PM
    Nov 26, 2020, 6:09 AM
    0 Votes
    6 Posts
    8k Views
    JP RoyJ Nov 26, 2020, 7:32 PM

    @PeterJones I went with the 2nd option of keeping the Arduino UDL and creating the arduino.xml and modifying the overrideMap.xml and it worked !

    Thank you very much for your awesome support !!

  • Marcin SniegM

    Duplicate same lines with regex search

    Watching Ignoring Scheduled Pinned Locked Moved
    2 Nov 26, 2020, 3:22 PM
    Nov 26, 2020, 11:58 AM
    0 Votes
    2 Posts
    244 Views
    A Nov 26, 2020, 3:22 PM

    @Marcin-Snieg

    Here’s an example of one way of doing it:

    create this text on a line: abc abc abc abc abc abc search for abc(?-s).* in regular expression search mode run a “Find All in Current Document” search

    The result:

    43a974e4-acd4-4c31-acb6-705124c7f696-image.png

  • Chris SeddonC

    Save As dialog treats the folder Open button as if it were the file Save button

    Watching Ignoring Scheduled Pinned Locked Moved
    3 Nov 26, 2020, 7:14 AM
    Nov 25, 2020, 9:24 PM
    0 Votes
    3 Posts
    830 Views
    Chris SeddonC Nov 26, 2020, 7:14 AM

    Smashing, thank you for the prompt solution!

  • A

    Find and remove everything else

    Watching Ignoring Scheduled Pinned Locked Moved
    17 Nov 25, 2020, 6:08 PM
    Nov 19, 2020, 5:54 PM
    0 Votes
    17 Posts
    3k Views
    guy038G Nov 25, 2020, 6:08 PM

    Hi, @anthony-noriega, @alan-kilborn, @terry-r and All,

    Oh, yes, Alan. You’re right ! Of course, I already downloaded the portable v7.9.1 version but I’m still “stuck” with the v7.8.5 version which explains why I didn"t notice this recent enhancement !

    So, thanks to @scott-sumner, we just have to use the (?-s)/\.\*\K(.+?)(?=\.\*/) regex, click on the Mark All button to get all the keywords and, then, click on the Copy Marked Text button and paste the results on a new document. Nice !

    BR

    guy038

  • Vasile CarausV

    Save Session/Load Session + Toggle Bookmark DOESN'T WORK

    Watching Ignoring Scheduled Pinned Locked Moved
    6 Nov 25, 2020, 3:36 PM
    Nov 25, 2020, 8:34 AM
    0 Votes
    6 Posts
    290 Views
    A Nov 25, 2020, 3:36 PM

    @Vasile-Caraus said in Save Session/Load Session + Toggle Bookmark DOESN'T WORK:

    Please fix it.

    it’s not about me, it is about improving a software

    It seems odd that someone who has been around the forum enough to post 275 times doesn’t know the proper PROCEDURE for filing a bug report.

    If you end up going that route, be sure to heed my advice from earlier, in your report:

    How about being thorough and presenting a small, completely reproduceable example

  • pbarneyP

    Has anyone seen this error?

    Watching Ignoring Scheduled Pinned Locked Moved
    1 Nov 25, 2020, 1:39 AM
    Nov 25, 2020, 1:39 AM
    0 Votes
    1 Posts
    130 Views
    No one has replied
  • pbarneyP

    "an exception occured due to plugin: ccc.dll"

    Watching Ignoring Scheduled Pinned Locked Moved
    3 Nov 25, 2020, 1:38 AM
    Nov 21, 2020, 7:22 PM
    0 Votes
    3 Posts
    379 Views
    pbarneyP Nov 25, 2020, 1:38 AM

    Thanks for the reply. The odd thing is that it doesn’t always trigger. It seems to go funky for a few days and then return to normal. It may be a layout thing in my source code or a particular file structure that’s tripping it up. But it’s working today, so it’s back on the shelf for now!

  • Sam 0S

    Need Notepad++ to Open Two Windows (with all tabs) when Computer Restarted

    Watching Ignoring Scheduled Pinned Locked Moved
    2 Nov 24, 2020, 9:07 PM
    Nov 24, 2020, 9:03 PM
    0 Votes
    2 Posts
    229 Views
    A Nov 24, 2020, 9:07 PM

    @Sam-0

    I would guess that File menu’s Save Session and Load Session might be useful to you, and probably the Session Manager plugin deserves a look as well.

The Community of users of the Notepad++ text editor.
Powered by NodeBB | Contributors