Advertisement
Lodhar

Notepad ++ regex

Jun 13th, 2021 (edited)
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.25 KB | None | 0 0
  1. *********************************
  2. Find and Replace duplicate
  3. Find: ^(.*?)$\s+?^(?=.*^\1$)
  4. Replace:
  5. *********************************
  6. String:"CITIES: SKYLINES - CONTENT CREATOR PACK: BRIDGES & PIERS 21 May, 2021
  7. This set of 22 unique assets from community creator Andrés “Armesto” Cortiña ranges from simple to ornate, with industrial and classical styles found around the world."
  8. Pattern:(\d{4})\v{1,2}\V{1,}\v{1,2}\v{1,2}
  9. Replace:
  10. Explain:
  11. \v => \r\n
  12. \V => not \r\n
  13. *********************************
  14.  
  15. n regex, the ! does not mean negation; instead, you want to negate a character set with [^"]. The brackets, [], denote a character set and if it starts with a ^ that means "not this character set".
  16. So, if you wanted to match things that are not double-quotes, you would use [^"]; if you don't want to match any quotes, you could use [^"'], etc.
  17.  
  18. With Notepad++, you should be able to search with the following to find lines that don't start with the " character:
  19. ^[^"]
  20. If you want to highlight the full line, use:
  21. ^[^"].*
  22. ****************************************
  23. TEXT: < / L A _ U R L > < / D A T A > < / W R M H E A D E R >
  24. FIND: ([^ ]) ([^ ])
  25. REPLACE: \1\2
  26. OUTPUT: </LA_URL></DATA></WRMHEADER>
  27. EXPLAIN: [^ ] => select non space characters
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement