String Extract

Pull out part of a text by position, between delimiters, with a regex group, or by line numbers.

Mode
Input
Extracted
Input: 0 chars Output: 0 chars Matches found: 0

About this tool

String Extract pulls a piece of text out using one of four strategies. Multiple results are placed on separate lines.

Modes

  • Substring — characters from a 0-based Start position, for Length characters (empty = to the end). A negative start counts from the end, so -4 takes the last four characters.
  • Between — text between a start and an end delimiter, optionally including the delimiters, first occurrence or all of them. An empty start delimiter means "from the beginning", an empty end delimiter "to the end".
  • Regex — every match of a JavaScript regular expression; choose which capture group to output (0 = the whole match). Unicode (u) is on by default (enables \p{L} and treats emoji as single characters). Matching runs in a background worker and a pattern that takes longer than 1.5 seconds is stopped.
  • Lines — line numbers and ranges such as 1-5, 10, 15-20. Line numbers start at 1; 12- means line 12 to the end. Lines are output in the order the ranges are listed.

Privacy

All processing happens in your browser. Nothing you type is sent, stored or logged.