• I need to replace some numbers....

    10
    0 Votes
    10 Posts
    701 Views
    PeterJonesP

    But at this point, I’m not sure I want to run the risk of you blaming us anymore for your problem. Hopefully this post will show you what happened.

    When I started with

    Begin PolyList Begin Polygon Origin -00128.000000,-00128.000000,-00128.000000 Normal -00001.000000,+00000.000000,+00000.000000 TextureU +00000.000000,+00001.000000,+00000.000000 TextureV +00000.000000,+00000.000000,-00001.000000 Vertex -00128.768546,-00128.000000,-00128.766453 Vertex -00128.000000,-00128.000000,+00128.000000 Vertex -00128.000000,+00131.756453,+00128.000000 Vertex -00128.000000,+00131.000000,-00128.000000 End Polygon

    with your three pesky spaces (or without, because it doesn’t affect the regex at all), and run @ekopalypse’s regex once with REPLACE ALL, it fixes two of the three instances:

    Begin PolyList Begin Polygon Origin -00128.000000,-00128.000000,-00128.000000 Normal -00001.000000,+00000.000000,+00000.000000 TextureU +00000.000000,+00001.000000,+00000.000000 TextureV +00000.000000,+00000.000000,-00001.000000 Vertex -00128.768546,-00128.000000,-00128.000000 Vertex -00128.000000,-00128.000000,+00128.000000 Vertex -00128.000000,+00131.000000,+00128.000000 Vertex -00128.000000,+00131.000000,-00128.000000 End Polygon

    Then I run it a second time, and it fixes the third instance.

    Begin PolyList Begin Polygon Origin -00128.000000,-00128.000000,-00128.000000 Normal -00001.000000,+00000.000000,+00000.000000 TextureU +00000.000000,+00001.000000,+00000.000000 TextureV +00000.000000,+00000.000000,-00001.000000 Vertex -00128.000000,-00128.000000,-00128.000000 Vertex -00128.000000,-00128.000000,+00128.000000 Vertex -00128.000000,+00131.000000,+00128.000000 Vertex -00128.000000,+00131.000000,-00128.000000 End Polygon

    The reasons this happens is because of the way the regex engine works inside of Notepad++: The first match found the start of the line, followed by Vertex, followed by as many characters as it could, until it hit the literal period that wasn’t before 6 zeroes. That means in -00128.768546,-00128.000000,-00128.766453 that it gobbled up all the characters until it found 766453 (the second set of non-zero decimal-fraction digits)… that’s then the fraction that it replaced with 000000 on that row. But at that point, the search cursor had moved beyond that line, so it didn’t see that the line still matches the regex. Hence it left that line as

    Vertex -00128.768546,-00128.000000,-00128.000000

    When you run the regex a second time, it gets rid of the second match earlier in the line.

    If @Ekopalypse had used a non-greedy regex ^Vertex.*?\.\K(?!0{6})(\d{6}) (the extra ? makes it non-greedy), then it would have fixed the 768546 on the first run of the regex, and 766453 on the second.

    Either way, just run the regex more than once, and it will work for you. If there are three numbers possible on each line (and given “polygon” and “vertex”, I am assuming that those are 3d coordinates, so three seems a reasonable max-per-line), then you should only have to run the regex a maximum of 3 times to get all the replacements done.

  • An annoying issue with UDL

    2
    0 Votes
    2 Posts
    271 Views
    PeterJonesP

    @Wunder-Wulfe said:

    The end statement for the for loop is dark purple when it should be a maroon color.

    because the UDL lexer cannot differentiate between “end (after func)” and “end (after for)”, because by that point in the lexing, I believe all it sees is “end”, and has lost the context of “(after ___)”.

    Using UDL, I don’t think you can fix it, and I don’t think there is an alternative. But I could be wrong, and someone else can feel free to chime in.

  • Where's the automatically wrap line?

    2
    0 Votes
    2 Posts
    242 Views
    rinku singhR

    menu item > View > Word wrap

  • Settings / Preferences / Language need improve

    2
    0 Votes
    2 Posts
    193 Views
    PeterJonesP

    Sounds like a feature request, which this FAQ explains how to make in a way that it will be properly tracked.

  • Identical files and different display of some characters ..

    2
    0 Votes
    2 Posts
    670 Views
    PeterJonesP

    @Federico-Lomazzi said:

    Comparing two short headers containing, each, exactly these 16 bytes (hex format): 01 00 01 00 44 AC 00 00 88 01 00 02 00 10 00

    That’s 15 bytes shown, not 16.

    As a text editor, Notepad++ will try to interpret those as text. It’s not ASCII, since some are over hex 80 (including the two bytes you reference, assuming you are counting bytes starting at 1). It might be one of the old 8-bit encodings. Or it might be a multi-byte encoding: either something like UCS-2-LE/BE (which is what Windows uses internally for multibyte-character strings), or it might be a unicode encoding such as UTF-8.

    Sometimes Notepad++ guesses wrong for what encoding is meant (it’s not always programmatically obvious what encoding you’re using); if it’s guessing wrong for you, I suggest Settings > Preferences > Misc and disabling ☐ Autodetect character encoding, then manually choosing the right encoding.

    i get a different characters view for bytes 6 and 9

    Since bytes 6 and 9 are AC and 88, I’m not sure why you think they should be the same, whether they’re really just those single-bytes, or whether they are multi-byte characters. (Or maybe by “same”, you mean they aren’t the same as what you think they should be… in which case, see the guesses-wrong-encoding, above.)

  • Cannot install any plugin (v7.7.1 64bit) on win10

    2
    0 Votes
    2 Posts
    343 Views
    Alan KilbornA

    @legendgod said:

    My company have setup proxy

    I would certainly start on the road to a solution by entering your proxy info in ? menu > Set Updater Proxy...

  • Save Files

    4
    0 Votes
    4 Posts
    2k Views
    PeterJonesP

    @Kyle-Christian said:

    It still is not working.

    After the description of what you’re doing, I disbelieve that it’s not working. My guess is that you’ve still got Windows hiding extensions, so you don’t notice the extension is actually there.

    So, I am going to find a new editor

    That’s not going to help if you’re not using Windows properly. And even if it’s something else, it won’t help when you come across some behavior in that program that you’d rather not figure out, or something that you think is that program’s fault, but is really the fault of Windows or something you’ve just not done correctly. Good luck with that long term.

    if you’d like continued help here, feel free to ask, and we’ll be happy to help you learn. Otherwise, good luck.

  • Is thear a plugin that lets me add anything to the tab collection.

    1
    0 Votes
    1 Posts
    159 Views
    No one has replied
  • Issues with 'New Instances'

    1
    1 Votes
    1 Posts
    161 Views
    No one has replied
  • How can I change Notepad++'s icon?

    3
    0 Votes
    3 Posts
    3k Views
    Prahlad-Makwana4145P

    hello @Mark-Garvey

    base on your question, I give solution is below

    Step 1:- Go to the Window Setting.
    Step 2:- Change default Program by extension.(.txt)
    Step 3:- Switch from notepad++ into notepad.
    Step 4:- Back to Notepad++ again.
    Step 5:- Refreshing Icon Image.

    I hope above solution is useful to you.
    Thank you…

  • New line ignores all indentation

    4
    0 Votes
    4 Posts
    364 Views
    EkopalypseE

    @Jackson-Capper

    would you mind post your debug-info which is available from ? menu, the last menu item?

  • Batch file open, select all, copy

    5
    0 Votes
    5 Posts
    782 Views
    Steven HaymesS

    Oops, I meant to put:

    INPUTBOX “$(FILE_NAME): Enter arguments or none to continue.”
    cd “$(CURRENT_DIRECTORY)”
    C:\Python37\python.exe “$(FILE_NAME)” $(INPUT)

    which gives you the option to give Python some command line arguments.

    Steve

  • 0 Votes
    3 Posts
    1k Views
    Alan KilbornA

    @Wayne-Blankenbeckler

    You won’t like this, but I’ll tell you what I do. Occasionally this happens to me as well, no rhyme or reason for it. I cancel the prompt box and then attempt to save the file again. It has never failed to save it, and the second try never has generated the same prompt box about admin mode again.

  • Can i make a simple subgroups in notepad++ ?

    2
    0 Votes
    2 Posts
    279 Views
    dailD

    I would recommend trying out Notepad++ yourself to see if it fulfills your need.

  • Using OR in replace. How to adress given group?

    6
  • How do I insert a cross reference link to a section within my file?

    2
    0 Votes
    2 Posts
    1k Views
    PeterJonesP

    Notepad++ is a text editor. Cross references are a feature of either a Word Processor or of a markup/markdown language for formatting text – but Notepad++ cannot be aware of the effectively-infinite number of possible markup languages available for making links between two places in the same document, and as an editor, isn’t really responsible for such things even when you’re editing a common language like HTML or Markdown. For markup languages, it’s up to the rendering application to provide those links.

    If you mean, “how do I add an HTML link” or “Markdown link”, those aren’t questions for a Notepad+±specific forum

  • Monitoring

    5
    0 Votes
    5 Posts
    2k Views
    Suzanne BrownS

    I did take a look at tail -f via “man tail” in Linux. seems like it would have very good application in big data.

  • Deletion of any line based on above mentioned Two Lines

    4
    0 Votes
    4 Posts
    422 Views
    guy038G

    Hello, @nitish-singh, @gurikbal-singh, @peterjones and All,

    As some of the lines of the XML file are, likely, preceded by some leading blank characters, the solution, below, should be preferred :

    SEARCH ^\h*<isRetrievable>false</isRetrievable>\R\h*<idName></idName>\R\K\h*<readOnly>true</readOnly>\R?

    REPLACE Leave EMPTY

    Best regards,

    guy038

  • NPPexport doesn't export colors in source code anymore

    3
    0 Votes
    3 Posts
    444 Views
    Michael VincentM

    @RickX62

    See this thread. Read all the way through if you’re interested, or just see the last post, which provides the fix in the official repo.

  • ReadOnly flag

    3
    2 Votes
    3 Posts
    862 Views
    Nachitous .-N

    That’s good enough.
    Thank you :)