Search code examples
notepad++large-files

How to divide one row of numbers in more rows in Notepad++


Hi I have a large list of numbers 1 - 100.000 in one row range 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ..... 100.000 I need to divide it from 1-500 row and next row from 501 to 1000, next 1001-1500, and so one. Can someone give me some instructions how to do this? I use Notepad++


Solution

  • Use replaceAll with regex (Keyword: lookaround assertions)

    • Find what: (?<=[05]00),\s
    • Replace with: \n

    In other words: replace all , with following whitespace character coming after 500 or 000 by a line break