• Regex Facebook

    6
    0 Votes
    6 Posts
    987 Views
    EkopalypseE

    Well without knowing how your UTM setup looks like and most importantly why this is npp related,
    the only general advise I could provide is, create a whitelist with the allowed pages and block
    the domain facebook otherwise.

  • 0 Votes
    3 Posts
    2k Views
    Abdelrahiman SolimanA

    Thank you Mr.Peter Jones. I tried the parentheses instead of the curly braces and it compiled and run a small java application. God bless you.

  • Using latest version 7.5 64bit. How to remove duplicte Lines

    31
    -1 Votes
    31 Posts
    12k Views
    guy038G

    Hi, @scott-fredrick-smith, and All,

    OK ! Taking in account, again, my first reges S/R, of my previous post :

    So, from your original text, below :

    0 AGH111900-1 GENERATOR 1 VA111200G1 GENERATOR ASSEMBLY - TOP LEVEL 2 VA111200P1 GENERATOR ASSEMBLY - HOUSING 2 100629-042 ADHESIVE, ANAEROBIC, LIQUID RESIN 2 200-000-111-112 CONNECTOR 2 200-000-112-004 CONNECTOR CONTACT 2 A50GB0013-1 TAPE, PRESSURE SENSITIVE ADHESIVE- POLYIMIDE 2 AS3236-06 BOLT, MACHINE - DOUBLE HEX HEAD 2 MIL-PRF-7808 PERF.SPEC,LUBRICATING OIL,GR3 2 MS16996-10 SCREW, SOCKET HEAD 2 VA112719P1 GEAR RETAINER 2 VA112719P2 GEAR RETAINER 2 VA112799P2 GROMMET - T2 2 VA112799P3 GROMMET 2 VA112817G1 PLATE - IDENTIFICATION 3 VA112817P1 PLATE - IDENTIFICATION 3 3-011-001 INSULATING CMPD,ELE 3 G11257P6 PLATE-BLANK 3 K34706P1 THINNER, PAINT PRODUCTS 4 S-8 THINNER, PAINT PRODUCTS 3 TD111234 PROCESS SPECIFICATION - SERIALIZATION 2 VA113269P1 COVER - DISCONNECT ASSEMBLY 2 VA113289P1 DISC RETAINER - GEAR 2 VA113448P4 BUSHING - HEATER HOUSING 2 VA113453P1 SHIM - 0.630 OD, 0.200 ID, 0.005 THK 2 VA113453P2 SHIM - 0.630 OD, 0.200 ID, 0.005 Thick

    The following regex S/R, named A, which :

    Deletes any line which does not contain VA Drawings and is different from the level 0 line

    Deletes all the P’s and G’s, followed with digits

    SEARCH (?-is)(?!.*VA\d+|^0|^\u)^.+\R|^\d\x20{3}|[GP]\d+

    REPLACE Leave EMPTY

    So, after clicking, once, on the Replace All button or several times on the Replace button, you should get :

    AGH111900-1 GENERATOR VA111200 GENERATOR ASSEMBLY - TOP LEVEL VA111200 GENERATOR ASSEMBLY - HOUSING VA112719 GEAR RETAINER VA112719 GEAR RETAINER VA112799 GROMMET - T2 VA112799 GROMMET VA112817 PLATE - IDENTIFICATION VA112817 PLATE - IDENTIFICATION VA113269 COVER - DISCONNECT ASSEMBLY VA113289 DISC RETAINER - GEAR VA113448 BUSHING - HEATER HOUSING VA113453 SHIM - 0.630 OD, 0.200 ID, 0.005 THK VA113453 SHIM - 0.630 OD, 0.200 ID, 0.005 Thick

    Now, with this new second regex S/R, named B, below, you just wipe out all duplicates lines !

    SEARCH (?-s)^(\h+(VA\d+)\x20.+\R)(\h+\2.+\R)+

    REPLACE \1

    After clicking, once, on the Replace All button or several times on the Replace button, here is what you get. Practically, your final text !

    AGH111900-1 GENERATOR VA111200 GENERATOR ASSEMBLY - TOP LEVEL VA112719 GEAR RETAINER VA112799 GROMMET - T2 VA112817 PLATE - IDENTIFICATION VA113269 COVER - DISCONNECT ASSEMBLY VA113289 DISC RETAINER - GEAR VA113448 BUSHING - HEATER HOUSING VA113453 SHIM - 0.630 OD, 0.200 ID, 0.005 THK

    Finally, we just have to normalize the indenting spaces, after the VA drawings ( VA\d+ ) to 4 space characters. Thus, this last regex S/R, named C

    SEARCH (VA\d+)\x20+

    REPLACE \1\x20\x20\x20\x20

    Again, after clicking, once, on the Replace All button or several times on the Replace button, you’ll obtain your expected text :

    AGH111900-1 GENERATOR VA111200 GENERATOR ASSEMBLY - TOP LEVEL VA112719 GEAR RETAINER VA112799 GROMMET - T2 VA112817 PLATE - IDENTIFICATION VA113269 COVER - DISCONNECT ASSEMBLY VA113289 DISC RETAINER - GEAR VA113448 BUSHING - HEATER HOUSING VA113453 SHIM - 0.630 OD, 0.200 ID, 0.005 THK

    Et voilà :-))

    Best Regards,

    guy038

    P. S. : Next time, I could give you some explanations on these 3 regex S/R ( A, B and C ) !

  • Replace only this first lines of world (i need maybe a plugin?)

    Locked
    3
    0 Votes
    3 Posts
    503 Views
    fanelise1F

    thanks sir. god bless you!

  • Search history bug

    8
    0 Votes
    8 Posts
    1k Views
    Patricia MayerP

    Hey guys,

    Sorry it took me some time to get back to you - but with good news now:

    I don’t use many plugins - nevertheless I installed v7.6.3 64bit on a test system first - the few I use are still working.

    And I haven’t encountered the behaviour since. But I’m keeping an eye on it and let you know if it happens again. ;)

    Thanks for your help.
    Patricia

  • Run Shift+F5 = Shell execure current file missing after update 7.6.3

    11
    0 Votes
    11 Posts
    2k Views
    PeterJonesP

    @Oliver-Majchrzak ,

    Alternately, if you’ve got a batch file that critically needs its current directory to be the same as the directory it’s in, that should be handled in the batch file itself. For example,

    @cd /d %~dp0

    (note that %~dp0 is using the “parameter extensions” on the %0 (which is the .bat’s pathname) as described at https://ss64.com/nt/syntax-args.html, to extract the drive and path, but not the filename).

    With that near the beginning of your batch script, you won’t need to change directory externally.

  • 0 Votes
    5 Posts
    2k Views
    Alan KilbornA

    when a power line went down in my neighborhood and there was no chance for a graceful shutdown.

    People…Name your files…Save (use the command) often. Jeez.

  • 0 Votes
    2 Posts
    1k Views
    EkopalypseE

    @Jack-Moorhead

    see here for more information

  • Replace Comma Before & After All 13 Digit Numbers

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    BecauseICanTBHB

    Worked! Thanks a lot!

  • 0 Votes
    4 Posts
    1k Views
    Richard Brock Jr.R

    Thank you both very much.

  • Delete whole line based on search

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    Omar KO

    Thanks Terry. That’s exactly what I was looking for. Just couldn’t see the Remove Bookmarked Lines option where I looked.

    Appreciate the quick response.

  • Need help with Replacing lines

    Locked
    2
    0 Votes
    2 Posts
    461 Views
    guy038G

    Hello @ilya-levadny and All,

    Actually, you want to delete all characters located after the second colon character, included, of any line

    Indeed, not difficult with regular expressions !

    Open the Replace dialog ( Ctrl + H )

    SEARCH (?-s)^(.+?:.+?):.+

    REPLACE \1

    Select the Regular expression search mode

    Check, preferably, the Wrap around option

    Click, once on the Replace All button or several times on the Replace button

    An other formulation would be :

    SEACRH (?-s)^.+?:.+?\K:.+

    REPLACE Leave EMPTY

    This time, due to the \K syntax you must use the Replace All button, exclusively

    Notes :

    The (?-s) in-line modifier means that dot ( . ) matches any single standard character, only

    The .+?: part looks for the shortest non-null range of characters till a colon ( : )

    The part between parentheses ( .+?:.+? ) is stored as group 1, which must be rewritten, during the replacement phase

    At the end, the .+ syntax represents the rest of the line, after the second colon char, included, of the current line

    In the second version, after matching the implicit group 1, the \K syntax resets the regex engine, so the final overall match is the part :.+ which corresponds to the second colon char with all the subsequent chars of current line, which are deleted as the replacement zone is empty

    Best Regards,

    guy038

  • Problem with Path names containing spaces ?

    9
    0 Votes
    9 Posts
    8k Views
    Stewart ClarkS

    Thanks Meta Chuh - that solved it!!

  • Cant Run a file in a browser??...

    Locked
    2
    0 Votes
    2 Posts
    487 Views
    Meta ChuhM

    welcome to the notepad++ community, @ForceTraps

    we would need more information to be eventually of help regarding your request.

    specify if by “run” you mean to open a file in notepad++ or to execute it with an external program ?
    if it is an external program you want to pass your document to, please name this external program.

    what file did you try to run ?
    (file location and name including it’s extension, aka “full path”)

    please clarify “Is it because i need a specific version”.
    what version of what program are you referring to ?

    please go to the notepad++ menu ? > debug info... > copy debug info into clipboard and paste the content here, as we will need this information, if some config files will have to be edited for your specific installation.

  • NppExec Problem

    Locked
    6
    1 Votes
    6 Posts
    948 Views
    PaoloRicardoP

    OK, I’ve found the problem. Instead of:

    c:\gnucobol\bin\cobc -x -std=mf $(FULL_CURRENT_PATH)

    I should have c:\gnucobol3\bin\cobc -x -std=mf $(FULL_CURRENT_PATH)
    ^
    Also, since I’ve already defined the PATH variable I can just use:

    cobc -x -std=mf $(FULL_CURRENT_PATH)
    or
    cobc -x -std=mf $(FILE_NAME)

    Thanks for the suggestions, guys.

    Paul

  • Search and replace with wildcards

    Locked
    6
    0 Votes
    6 Posts
    2k Views
    Meta ChuhM

    @Pingponguin

    I followed the noob path but really did not understand how this should help me with my question.

    yes, i can relate completely.
    whilst we (as the notepad++ community) do have a vast library of regex examples and guides, it can be difficult to get a first firm grip at regex, without having a few real life examples, one can personally relate to.

    also there are some vast differences on how different users reach the same results with almost completely different syntaxes (let’s call them “personal regex dialects”).
    for example @Alan-Kilborn 's regex syntax for your request is perfect to begin with, because it is as easy as possible to read and understand.

    but if you stick around, you will also see regexes that often do the same and are very difficult to digest.
    (i usually still stick to syntaxes i can completely understand and/or are easier to break down to smaller parts)

  • Problem mit Notepad++ / Problem with Notepad ++

    Locked
    5
    1 Votes
    5 Posts
    5k Views
    Meta ChuhM

    @PeterJones

    it seems as if we all get more and more multilingual lately …

    … if it continues like that, @Alan-Kilborn is going to answer every request in swedish only, and @guy038 will do all explanations in a specific japanese dialect, only spoken in a single village, north of gokayama 😂😂😂

    @Dennis-Schlüter
    yes, @PeterJones is absolutely correct.
    as long as you stick to one single encoding (like ansi) and no other software requires anything else (like utf-8), you will be on the safe side.
    and it is better to rely on yourself, choosing the file format encoding, than any auto-detection.

    note: once you manually changed to ansi, please re-check all vital documents for incorrect characters instead of german umlauts, as wrong characters are likely to exist, once the document has been switched back and forth from one encoding to another.

    @PeterJones

    最近私たち全員がますます多言語を話すようになります…

    …それでもこのように続けば、アランはすべての要求にスウェーデン語で答えることになります、そして男は特定の日本語の方言ですべての説明をするでしょう、gokayamaの北の単一の村で話されるだけです😂😂😂

    @Dennis-Schlüter
    はい、@PeterJones は正しいです。
    (ansiのように)1つのエンコーディングに固執し、他のソフトウェアが(utf-8のように)他に必要としない限り、あなたは安全な側にいるでしょう。
    自動検出よりも、ファイル形式のエンコーディングを選択して自分に頼ることをお勧めします。

    注:手動でansiに変更した場合は、文書をあるエンコードから別のエンコードに切り替えた後に、誤った文字が存在する可能性があるため、重要な文書すべてにドイツ語のウムラウトではなく誤った文字がないか再確認してください。

    😉

  • 0 Votes
    8 Posts
    2k Views
    PPsmmP

    Thanks Meta Chuh, that’s a really clever idea - I’ll definitely give this a try

  • 0 Votes
    4 Posts
    1k Views
    Ziad AboramiZ

    Thanks very much.
    It worked fine.
    I have put
    \R(?!(<article>(.+?)</article>))
    Then the same method

    Best wishes

  • How can i use zen coading plugin in Notepad++ 7.6.3 ?

    1
    0 Votes
    1 Posts
    345 Views
    No one has replied