Text::Clip3pm
Clip and extract text in clipboard-like way
Usage
$data = <<_END_# Xyzzy# --- STARTqwerty1 2 3 4 5 68 9 10 The end# abcdefghijklmnop_END_$mark = Text::Clip->new( data => ... )->find( qr/#\s*--- START/ )( $mark, $content ) = $mark->find( qr/ The end/, slurp => '[]' )
$content =
# --- STARTqwerty1 2 3 4 5 68 9 10 The end
Alternatively, with
( $mark, $content ) = $mark->find( qr/ The end/, slurp => '()' )
$content =
qwerty1 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.
Copyright and license
This software is copyright (c) 2010 by Robert Krimen.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Releases
3 releases since Debian 8 (Jessie); the text changed 1 time.