Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • M Andre Z EckenrodeM

      Search++ (\W)'(\w) regex replace failure

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      36
      0 Votes
      36 Posts
      1k Views
      CoisesC
      @M-Andre-Z-Eckenrode said: @Coises And just now tried Find (\w)a(\w) and Replace \1z\2 with the same list of words, which definitely resulted in at least one anomalous replacement (average became avevzie), possibly more, but the mistakes are more difficult to spot at a glance in this case. I hate continuing to bother you about this with different questions, but I am so stumped. Have you noticed: Do bad substitutions happen if the document is set as UTF-8, or is it specific to ANSI? (For a test, just use Encoding | Convert to UTF-8 on a document containing your test text before trying to Replace.) Have you ever seen a bad replacement where the replacement string did not use a capturing group reference (like \1 or \2 or $1 or $2)?
    • P

      Remove lines starting by...

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      2
      0 Votes
      2 Posts
      43 Views
      PeterJonesP
      @Passant-Delarue , Initial guess: turn off “. matches newline”, otherwise your .* will greedily match the whole file.