GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Data::Object::Replace(3) User Contributed Perl Documentation Data::Object::Replace(3)

Data::Object::Replace

Replace Class for Perl 5

  package main;

  use Data::Object::Replace;

  my $replace = Data::Object::Replace->new([
    '(?^:(test))',
    'this is a real event',
    1,
    [
      10,
      10
    ],
    [
      14,
      14
    ],
    {},
    'this is a test'
  ]);

This package provides methods for manipulating replace data.

This package inherits behaviors from:

Data::Object::Array

This package integrates behaviors from:

Data::Object::Role::Dumpable

Data::Object::Role::Proxyable

Data::Object::Role::Throwable

This package uses type constraints from:

Data::Object::Types

This package implements the following methods:

  captures() : ArrayRef

The captures method returns the capture groups from the result object which contains information about the results of the regular expression operation.

captures example #1
  # given: synopsis

  $replace->captures; # ['test']
    

  count() : Num

The count method returns the number of match occurrences from the result object which contains information about the results of the regular expression operation.

count example #1
  # given: synopsis

  $replace->count; # 1
    

  initial() : Str

The initial method returns the unaltered string from the result object which contains information about the results of the regular expression operation.

initial example #1
  # given: synopsis

  $replace->initial; # this is a test
    

  last_match_end() : Maybe[ArrayRef[Int]]

The last_match_end method returns an array of offset positions into the string where the capture(s) stopped matching from the result object which contains information about the results of the regular expression operation.

last_match_end example #1
  # given: synopsis

  $replace->last_match_end; # [14, 14]
    

  last_match_start() : Maybe[ArrayRef[Int]]

The last_match_start method returns an array of offset positions into the string where the capture(s) matched from the result object which contains information about the results of the regular expression operation.

last_match_start example #1
  # given: synopsis

  $replace->last_match_start; # [10, 10]
    

  matched() : Maybe[Str]

The matched method returns the portion of the string that matched from the result object which contains information about the results of the regular expression operation.

matched example #1
  # given: synopsis

  $replace->matched; # test
    

  named_captures() : HashRef

The named_captures method returns a hash containing the requested named regular expressions and captured string pairs from the result object which contains information about the results of the regular expression operation.

named_captures example #1
  # given: synopsis

  $replace->named_captures; # {}
    

  postmatched() : Maybe[Str]

The postmatched method returns the portion of the string after the regular expression matched from the result object which contains information about the results of the regular expression operation.

postmatched example #1
  # given: synopsis

  $replace->postmatched; # ''
    

  prematched() : Maybe[Str]

The prematched method returns the portion of the string before the regular expression matched from the result object which contains information about the results of the regular expression operation.

prematched example #1
  # given: synopsis

  $replace->prematched; # 'this is a '
    

  regexp() : RegexpRef

The regexp method returns the regular expression used to perform the match from the result object which contains information about the results of the regular expression operation.

regexp example #1
  # given: synopsis

  $replace->regexp; # qr/(test)/
    

  string() : Str

The string method returns the string matched against the regular expression from the result object which contains information about the results of the regular expression operation.

string example #1
  # given: synopsis

  $replace->string; # this is a test
    

Al Newkirk, "awncorp@cpan.org"

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file" <https://github.com/iamalnewkirk/data-object/blob/master/LICENSE>.

Wiki <https://github.com/iamalnewkirk/data-object/wiki>

Project <https://github.com/iamalnewkirk/data-object>

Initiatives <https://github.com/iamalnewkirk/data-object/projects>

Milestones <https://github.com/iamalnewkirk/data-object/milestones>

Contributing <https://github.com/iamalnewkirk/data-object/blob/master/CONTRIBUTE.md>

Issues <https://github.com/iamalnewkirk/data-object/issues>

2020-04-27 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.