• Help with Replace

    2
    0 Votes
    2 Posts
    376 Views
    EkopalypseE

    @Tom-Wak

    with the provided data I would assume that something like
    find: (?-s)(\w+:\w+):\w+(?=.*)
    replace: \1
    should do the job.

  • Notepad reports an error while Pycharm can execute normally.Why???

    2
    0 Votes
    2 Posts
    569 Views
    EkopalypseE

    @liuming-zhu

    this is a python programming question rather than a npp related one.
    See here. Npp doesn’t silently change your code.
    Why you get different result can’t be answered from remote - obviously you do have different configurations.

  • Double click macro/shortcut setting?

    2
    0 Votes
    2 Posts
    414 Views
    EkopalypseE

    @Derek-Muller

    Afaik, no.

  • 0 Votes
    5 Posts
    565 Views
    Steven HaymesS

    I agree. I was bad. The original post does not belong here and it would be more appropriate in a forum for the programming language involved.

  • npp doesn't "run" my code in my browser any more

    10
    0 Votes
    10 Posts
    8k Views
    PeterJonesP

    @James-Shanley: Welcome to the Notepad++ Community forum. You said:

    I looked at the other file I have that runs properly I found it was saved as a .html file. I saved my other file as one and it worked

    Good detective work, @James-Shanley ; I like it when new Community members are so helpful in their first post; it’s a refreshing change from “do everything for me” posts that we often see from new members.

    There was a more-recent discussion about that in this other topic from a couple weeks ago (vs years ago for this topic), which came to the same conclusion. As a result, I opened the issue#5903 to request that more file types would allow View > View Current File In… Hopefully, that will make it into a future release.

  • How to format "tabbed text" & check for alpha-numeric values?

    2
    0 Votes
    2 Posts
    383 Views
    Alan KilbornA

    @Bhavtosh-Sharma

    Not really sure what you are going for for #1, but for #2 an approach would be to find all non-digits while disregarding whitespace, maybe something like this:

    Find: [^\d\s]+

  • How to replace spaces with another character?

    5
    0 Votes
    5 Posts
    2k Views
    Jarka MetelkaJ

    Thanks a lot, that’s exactly what I need. I know about the difference in the first example, so first I need to apply the space insertion and then replace more than 2 spaces with a semicolon.

  • REQUEST: Value of character in status line

    9
    0 Votes
    9 Posts
    1k Views
    Blafulous CrassleyB

    Thank you @guy038 that is very helpful! Since I got into the print industry I learned a lot about all the various dashes and spaces, and even non-breaking spaces.

    I will very likely be unable to install PythonScript to get that character value since I’m on a multi-user machine I don’t have permissions to install it in c:\program files (x86)\ or any variant thereof. Plus we are super busy right now.

  • DIRECTORY already exists. Do you want to replace it?

    7
    0 Votes
    7 Posts
    924 Views
    Ephrim KhongE

    @Ekopalypse Yes, that fixed it, thank you!

    Switching to the “new” dialog solves that issue and seems to use the system-wide Save As… dialog.

  • 0 Votes
    5 Posts
    2k Views
    Taz ManianT

    Thank you for your response. It looks like I lost the file at this point. I tried Recuva but it doesn’t even recognize the file.

  • Mixed fonts (English & tamil (Akarathi)) copying issue

    2
    0 Votes
    2 Posts
    632 Views
    EkopalypseE

    @Mohideen-Pitchai

    I assume only by using/finding a font which is capable of displaying it correctly, or, if possible, by creating an UDL which sets different fonts for different parts of the text but this means there must be an start and end indicator for each text part.

  • Number total of pages

    5
    0 Votes
    5 Posts
    2k Views
    EkopalypseE

    @Stéphane-Lavergne

    you can only edit within the 180 seconds, afterwards it is locked.
    Makes sense if one reads your post later because otherwise one would read answers
    to questions which don’t match anymore as either answers or questions have been edited.

  • Trim length between two characters

    6
    0 Votes
    6 Posts
    747 Views
    guy038G

    Hello, @sean, @alan-kilborn, @steven-haymes, and All,

    I’m afraid that, in order to use the column mode, in a reliable way, we should align the comma symbols, padding preceding positions with spaces chars !

    So, this time, the regex solution seems to be more secure ;-))

    For instance, with that sample text, below :

    #,6100795442608787,1 #,205300099864,1 #,65433455333,5 #,20530002200815618844,1 #,3360,20 #,718103267854,2 #,67764334775,8

    Here is a regex S/R which deletes any non-null range of digits, after the 11th, till the second comma of each line :

    SEARCH ^#,\d{11}\K\d+(?=,)

    REPLACE Leave EMPTY

    Tick the Wrap around

    Select the Regular expression search mode

    Click, exclusively, on the Replace All button

    And, we would obtain the expected result :

    #,61007954426,1 #,20530009986,1 #,65433455333,5 #,20530002200,1 #,3360,20 #,71810326785,2 #,67764334775,8

    Best Regards,

    guy038

  • how to enlight more than word ?

    4
    0 Votes
    4 Posts
    533 Views
    jmclejJ

    Thanks for both useful answers !

  • Function list sort and reload buttons showing as black squares

    1
    0 Votes
    1 Posts
    266 Views
    No one has replied
  • Purpose of <nameExpr> in functionList.xml

    5
    1 Votes
    5 Posts
    927 Views
    rossjparkerR

    Thanks once again @guy038. Your valuable suggestions/corrections have been incorporated once again:

    <parser displayName="CiCode" id ="cicode_function" commentExpr="(?x) # free-spacing for commenting (?s:\x2F\x2A.*?\x2A\x2F) # Multi Line Comment: /* ... */ | (?m-s:\x2F{2}.*$) # Single Line Comment: // ... | (?m-s:\!.*$) # Single Line Comment: ! ... | (?s:\x22(?:[^\x22\x5C]|\x5C.)*\x22) # String Literal - Double Quoted | (?s:\x27(?:[^\x27\x5C]|\x5C.)*\x27) # String Literal - Single Quoted " > <function mainExpr="(?x) # free-spacing for commenting (?i) # ignore case FUNCTION\s+ # CiCode functions marked by keyword 'function' (any case) \K # discard everything matched so far - 'function' keyword not part of function name \w+? # function name itself (non-greedy match) \(.*?\) # function parameter list surrounded by brackets " /> </parser>

    This is my latest version of the parser with a proper commentExpr parser. (CiCode supports C-style comments with the addition of !<comment-to-end-of-line> being synonymous with //<comment-to-end-of-line>.

    One of my files does indeed have several commented functions - these are now correctly ignored. Thanks again.

  • 0 Votes
    4 Posts
    581 Views
    PeterJonesP

    @Melvin-Pereira said:

    after the mess caused by the software. … I did not have backups enabled.

    To be fair, Notepad++ offered a backup feature which you had chosen not to enable.

    The bug you encountered was fixed 9 months ago with the release of v7.5.9 – the release notes in item #2 clearly explain that it fixed file corruption in abnormal circumstances (like a crash) – and there have been all of the v7.6.* releases thru the current v7.7.1 releases, many of which have been pushed to auto-update (including v7.7.1). If you don’t avail yourself of auto-update, and don’t choose to check release notes for critical bug fixes, I’m not sure what more can be done to notify people of bugs and issues, and to encourage updating to newer versions to fix bugs.

    Is there no way, the file can be recovered?

    Historically, there have been suggestions for external file recovery software, but I can make no warranty for how well they will work in your particular case.

  • new notepad++ user, need help editing g code

    3
    0 Votes
    3 Posts
    916 Views
    Quinn RCQ

    @PeterJones said:

    M1231\r\n$0\r\nM1230

    perfect! thank you very much. I will definitely follow your links to learn to do this stuff for myself, but i very much appreciate the included answer.

  • 0 Votes
    3 Posts
    605 Views
    PeterJonesP

    @Marcel-Vossen said:

    Does anyone know what is causing this ‘unwanted feature’ and what purpose it has, and how to avoid it?

    As to why it’s happening for you: since you don’t tell us anything about your subtitle file – like if there are long lines, or indented lines – we don’t have enough to replicate your circumstances and figure out what’s causing it.

    However, my guess (and @andrecool-68 's guess, too) is it has something to do with long lines. If you’ve got a long line (wider than the screen width) which is indented, if you hit HOME (and haven’t changed your key mappings), it will take you to the first non-indent character of that line, but won’t show the characters to the left of the indent. If you hit ENTER from the end of a long line, it will auto-indent the next line to that location, and similarly won’t show the characters to the left of the indent. Using the horizontal scroll bar at the bottom of the window, or hitting HOME a second time, or hitting Alt+HOME, should all allow you to scroll all the way to the left edge of your document. Changing the word-wrap settings, as @andrecool-68 suggested, may or may not help.

    (And horizontal scroll bars and hitting HOME one or more times to get to the left edge of a line are common to most editing software I’ve used; I’m surprised you thought you had to arrow over. Make sure you add scroll bars and HOME keys to your bag of tricks for all editing software.)

  • Python syntax highlighting

    6
    0 Votes
    6 Posts
    9k Views
    Steven HaymesS

    Pete,

    Thanks for the better answer! I have not had to use this very obvious feature of the Style Configurator 🙄

    Steve