ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Handle.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Handle.pm (file contents):
Revision 1.243 by root, Mon Mar 16 08:15:46 2015 UTC vs.
Revision 1.244 by root, Wed Apr 1 19:59:01 2015 UTC

1570}; 1570};
1571 1571
1572=item regex => $accept[, $reject[, $skip], $cb->($handle, $data) 1572=item regex => $accept[, $reject[, $skip], $cb->($handle, $data)
1573 1573
1574Makes a regex match against the regex object C<$accept> and returns 1574Makes a regex match against the regex object C<$accept> and returns
1575everything up to and including the match. 1575everything up to and including the match. All the usual regex variables
1576($1, %+ etc.) from the regex match are available in the callback.
1576 1577
1577Example: read a single line terminated by '\n'. 1578Example: read a single line terminated by '\n'.
1578 1579
1579 $handle->push_read (regex => qr<\n>, sub { ... }); 1580 $handle->push_read (regex => qr<\n>, sub { ... });
1580 1581

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines