Text::Clip(3pm)

Text::Clip3pm

Clip and extract text in clipboard-like way

Usage

    $data = <<_END_
    # Xyzzy
    #   --- START 
        qwerty
            1 2 3 4 5 6
    8 9 10 The end
    # abcdefghi
            jklmnop
    _END_
    $mark = Text::Clip->new( data => ... )->find( qr/#\s*--- START/ )
    ( $mark, $content ) = $mark->find( qr/ The end/, slurp => '[]' )

$content =

    #   --- START 
        qwerty
            1 2 3 4 5 6
    8 9 10 The end

Alternatively, with

    ( $mark, $content ) = $mark->find( qr/ The end/, slurp => '()' )

$content =

        qwerty
            1 2 3 4 5 6

Version

version 0.0014

Overview

Text::Clip allows you to mark/slice up a piece of text. String matching (by regular expression, etc.) is used to place marks. The first mark lets you access the text preceding and following the mark. Subsequent marks allow you to slurp up the text "clipped" between the marks.

Releases

3 releases since Debian 8 (Jessie); the text changed 1 time.

  1. 8
  2. 9–10

Author

  Robert Krimen <[email protected]>

From libtext-clip-perl 0.14-2 in Debian 10 (Buster). Parsed by carta from the page's man source.