Text Column Selection Tool

Input Text

Selection Settings
For example: Start Column=1, Length=10 will select 10 characters/bytes from column 1 of each line

Selection Result

Instructions:

Features:

  • Select by Character:Select by character units, counting one Chinese character as one character, suitable for text processing
  • Select by Byte:Select by byte units, with one Chinese character occupying 3 bytes (UTF-8), suitable for fixed-length records
  • Flexible Column Range:Supports specifying start column and length, allowing selection of any column range
  • Smart Processing:Supports options like trimming spaces, removing empty lines, adding line numbers, etc.
  • Convenient Operation:Supports one-click copying of selection results
  • Pure front-end processing, data is not uploaded to the server, ensuring privacy and security

Use Cases:

  • Log File Processing: Extract specific fields from logs (e.g., timestamp, level, message)
  • Fixed-Length Record Processing: Handle fixed-format text files by extracting data based on column positions
  • Data Cleaning: Select useful parts from messy text
  • Code Processing: Extract specific columns from code (e.g., remove line numbers, extract comments)
  • Table Data Extraction: Select specified columns from aligned text tables
  • Batch Text Trimming: Uniformly extract specified parts from multiple lines of text

Usage Tips:

  • Column numbering starts at 1; column 1 corresponds to the first character/byte
  • Leave length empty to select until the end of each line
  • If the start column exceeds the line length, the output for that line will be empty (use the "Remove Empty Lines" option to filter)
  • Character mode is suitable for mixed Chinese and English text; byte mode is suitable for fixed-byte-width records
  • Use the "Add Line Numbers" option to retain original line number information in the output

Example:

Original text:  Hello World! Welcome
Start column=7, length=5 (character mode)
Selection result: World