Related Tools
The online text filtering tool uses raw text, line number or regular expression to filter the lines that conform to the rules in the text, and uses separator or regular expression to extract the columns that conform to the rules in the text.
-
Line Filter :
- All Lines : No filtering, that is, all lines of text comply with the rules.
- Line Number : Select lines according to the line number. Line numbers support the form of numbers, ranges, and An+B (n is an integer of 0,1,2,3,4...). For example 3,5-10,2n+1,5n. Multiple line number rules are separated by commas, and the union of all input line numbers will be selected. For example, entering 1,2-3 will select lines 1,2,3.
- Text Match : The line needs to contain the entered text to match.
- Regex Match : The line needs to match the regular expression.
- Reverse : If yes is selected, lines with mismatched rules will be selected.
-
Col Filter :
- All Columns : Output the whole line of text completely.
- Text Split : Use the text split behavior to split multiple columns (only count non-empty columns).
- Regex Split : Use regular expressions to split multiple columns (only count non-empty columns).
- Regex Match : Take the content that the regular expression matches as a column. If there are multiple matches, multiple columns will be formed.
- Format : How to combine split or matched columns into rows. ${0} represents the original whole line of text, ${1} represents the first column, ${2} represents the second column, and so on. If the ${number} does not match the column, it will be output as is. Other text in the format will be output as is.
- Regular expression : Regex - javascript regex string , Regex Flag - The flags of regular expressions. The range of flags supported by this tool is d, i, u. The supported regular expression syntax is Javascript Regular Expression.
- Open File : Open the local text file, and the supported file encoding is UTF-8. If your file is not encoded like this, you can open it in another editor and copy it into the input.
- Download : Download the processing results locally.
-
Use Example:
- Extract even lines of text : The parameters used are Line Filter - Line Number, Line No - 2n, Reverse - No, Col Filter - All Columns.
-
Extract the MySQL image ID and convert it to the delete image command : The
parameters used are Line Filter -
Text Match, Text - mysql, Reverse - No, Col Filter - Text Split,
Text - (one space), Format - docker image rm ${3}.
InputREPOSITORY TAG IMAGE ID CREATED SIZE nginx 1.19.7 35c43ace9216 16 months ago 133MB mysql 5.7.31 d05c76dbbfcf 24 months ago 448MB redis latest 191c4af7dcdd 2 years ago 89.3MB mysql 5.7.12 2fd136002c22 6 years ago 378MB
Outputdocker image rm d05c76dbbfcf docker image rm 2fd136002c22