• ARTICLE
  • STRING
  • CONVERTER
  • ENCRYPT
  • NETWORK
  • MORE
  • ARTICLE
    STRING
    CONVERTER
    ENCRYPT
    NETWORK
    MORE
logo Online Tools
Favorite Copy Link Share

Text Filter Online


Text Filter Online-summary

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.

Text Filter Online-instructions
  1. Line Filter :
    1. All Lines : No filtering, that is, all lines of text comply with the rules.
    2. 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.
    3. Text Match : The line needs to contain the entered text to match.
    4. Regex Match : The line needs to match the regular expression.
    5. Reverse : If yes is selected, lines with mismatched rules will be selected.
  2. Col Filter :
    1. All Columns : Output the whole line of text completely.
    2. Text Split : Use the text split behavior to split multiple columns (only count non-empty columns).
    3. Regex Split : Use regular expressions to split multiple columns (only count non-empty columns).
    4. Regex Match : Take the content that the regular expression matches as a column. If there are multiple matches, multiple columns will be formed.
    5. 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.
  3. 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.
  4. 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.
  5. Download : Download the processing results locally.
  6. Use Example:
    1. Extract even lines of text : The parameters used are Line Filter - Line Number, Line No - 2n, Reverse - No, Col Filter - All Columns.
    2. 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}.
      Input
      REPOSITORY                                                       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

      Output
      docker image rm d05c76dbbfcf
      docker image rm 2fd136002c22
0 comments