I have a huge .txt file with multiple lines, but there's a particular string on a line that separates a number of lines from one another
I want to use that string to split into numerous files named the current string.
Example of specific string:
Found matches in (anything can be here):
Example of data in huge .txt:
Found matches in (anything can be here):
..............
..............
..............
..............
..............
..............
Found matches in EXAMPLE:
..............
..............
..............
..............
..............
..............
Desired output:
Found matches in (anything can be here).txt < contains data below its self but before another line stating " Found matches in
Found matches in EXAMPLE.txt < contains data below its self but before another line stating " Found matches in
Also it's possible that there could be duplicate " Found matches in (anything can be here)" lines with data, so rather than overwrite the current, is it possible to rename (1) and (2) and (3) etc or just simply ADD too the current file ( not overwrite)