1Text::Clip(3)         User Contributed Perl Documentation        Text::Clip(3)
2
3
4

NAME

6       Text::Clip - Clip and extract text in clipboard-like way
7

VERSION

9       version 0.0014
10

SYNOPSIS

12           $data = <<_END_
13           # Xyzzy
14           #   --- START
15               qwerty
16
17                   1 2 3 4 5 6
18           8 9 10 The end
19
20           # abcdefghi
21                   jklmnop
22           _END_
23
24           $mark = Text::Clip->new( data => ... )->find( qr/#\s*--- START/ )
25           ( $mark, $content ) = $mark->find( qr/ The end/, slurp => '[]' )
26
27       $content =
28
29           #   --- START
30               qwerty
31
32                   1 2 3 4 5 6
33           8 9 10 The end
34
35       Alternatively, with
36
37           ( $mark, $content ) = $mark->find( qr/ The end/, slurp => '()' )
38
39       $content =
40
41               qwerty
42
43                   1 2 3 4 5 6
44

DESCRIPTION

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

AUTHOR

52         Robert Krimen <robertkrimen@gmail.com>
53
55       This software is copyright (c) 2010 by Robert Krimen.
56
57       This is free software; you can redistribute it and/or modify it under
58       the same terms as the Perl 5 programming language system itself.
59
60
61
62perl v5.32.0                      2020-07-28                     Text::Clip(3)
Impressum