The split by regex filter breaks a file into several smaller ones after each occurrence of the supplied regex.
Each new file will have the name of the original file with a number appened before the files extension. The first number is specified by the count parameter.
The concept of this filter is very simple but there are many details that can effect its behavior. Therefore there are many options availabe as described in the parameter list below.
|regex||the regex to be searched for||Yes|
|count||the first number to be used to name the new files||No, defaults to 1|
|endString||a string added to the file name between the original name and the 'count' number||No, defaults to "" (empty string)|
|saveHeaderAlone||saves the header in it a separate file (the header refers to all text found before the first regex occurance||No, defaults to false|
|repeatHeaderInEachFile||flag indicating that the header text should be placed at the beginnig of each newly created file||No, defaults to false|
|cutBefore||flag indicating that the split should be performed before the occurance of the regex as apposed to after the regex||No, defaults to true (has no effect when dropRegexText is true)|
|dropRegexText||flag indicating that the regex should be dropped and should not appear in any of the new files||No, defaults to false|
<splitByRegex regex="new file"/>Splits every time the words 'new file' are found and the new file names start with 10
<splitByRegex regex="new file" count"10" endString="--"/>Splits every time the words 'new file' are found but drops the words 'new file' and the header will be saved separately
<splitByRegex regex="new file" dropRegexText="true" saveHeaderAlone="true"/>Splits every time the words 'new file' are found the words 'new file' will appear at the end of each file
<splitByRegex regex="new file" cutBefore="false"/>Splits every time the words 'new file' are found the words 'new file' the beginning of each file and the header will be repeated in each file
<splitByRegex regex="new file" cutBefore="true" repeatHeaderInEachFile="true"/>