Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
re2::PCRE Class Reference

#include <pcre.h>

Classes

class  Arg
 
struct  ConsumeFunctor
 
struct  FindAndConsumeFunctor
 
struct  FullMatchFunctor
 
struct  PartialMatchFunctor
 

Public Types

enum  Anchor {
  UNANCHORED, ANCHOR_START, ANCHOR_BOTH, UNANCHORED,
  ANCHOR_START, ANCHOR_BOTH
}
 
enum  Anchor {
  UNANCHORED, ANCHOR_START, ANCHOR_BOTH, UNANCHORED,
  ANCHOR_START, ANCHOR_BOTH
}
 
enum  Option {
  None = 0x0000, UTF8 = 0x0800, EnabledCompileOptions = UTF8, EnabledExecOptions = 0x0000,
  None = 0x0000, UTF8 = 0x0800, EnabledCompileOptions = UTF8, EnabledExecOptions = 0x0000
}
 
enum  Option {
  None = 0x0000, UTF8 = 0x0800, EnabledCompileOptions = UTF8, EnabledExecOptions = 0x0000,
  None = 0x0000, UTF8 = 0x0800, EnabledCompileOptions = UTF8, EnabledExecOptions = 0x0000
}
 

Public Member Functions

bool CheckRewriteString (const StringPiece &rewrite, std::string *error) const
 
bool CheckRewriteString (const StringPiece &rewrite, std::string *error) const
 
void ClearHitLimit ()
 
void ClearHitLimit ()
 
bool DoMatch (const StringPiece &text, Anchor anchor, size_t *consumed, const Arg *const *args, int n) const
 
bool DoMatch (const StringPiece &text, Anchor anchor, size_t *consumed, const Arg *const *args, int n) const
 
const std::string & error () const
 
const std::string & error () const
 
bool HitLimit ()
 
bool HitLimit ()
 
int NumberOfCapturingGroups () const
 
int NumberOfCapturingGroups () const
 
const std::string & pattern () const
 
const std::string & pattern () const
 
 PCRE (const char *pattern)
 
 PCRE (const char *pattern)
 
 PCRE (const char *pattern, const PCRE_Options &re_option)
 
 PCRE (const char *pattern, const PCRE_Options &re_option)
 
 PCRE (const char *pattern, Option option)
 
 PCRE (const char *pattern, Option option)
 
 PCRE (const std::string &pattern)
 
 PCRE (const std::string &pattern)
 
 PCRE (const std::string &pattern, const PCRE_Options &re_option)
 
 PCRE (const std::string &pattern, const PCRE_Options &re_option)
 
 PCRE (const std::string &pattern, Option option)
 
 PCRE (const std::string &pattern, Option option)
 
 ~PCRE ()
 
 ~PCRE ()
 

Static Public Member Functions

static bool Extract (const StringPiece &text, const PCRE &pattern, const StringPiece &rewrite, std::string *out)
 
static bool Extract (const StringPiece &text, const PCRE &pattern, const StringPiece &rewrite, std::string *out)
 
static int GlobalReplace (std::string *str, const PCRE &pattern, const StringPiece &rewrite)
 
static int GlobalReplace (std::string *str, const PCRE &pattern, const StringPiece &rewrite)
 
static std::string QuoteMeta (const StringPiece &unquoted)
 
static std::string QuoteMeta (const StringPiece &unquoted)
 
static bool Replace (std::string *str, const PCRE &pattern, const StringPiece &rewrite)
 
static bool Replace (std::string *str, const PCRE &pattern, const StringPiece &rewrite)
 

Static Public Attributes

static const ConsumeFunctor Consume = { }
 
static const FindAndConsumeFunctor FindAndConsume = { }
 
static const FullMatchFunctor FullMatch = { }
 
static Arg no_more_args
 
static const PartialMatchFunctor PartialMatch = { }
 

Private Member Functions

pcre * Compile (Anchor anchor)
 
pcre * Compile (Anchor anchor)
 
bool DoMatchImpl (const StringPiece &text, Anchor anchor, size_t *consumed, const Arg *const args[], int n, int *vec, int vecsize) const
 
bool DoMatchImpl (const StringPiece &text, Anchor anchor, size_t *consumed, const Arg *const args[], int n, int *vec, int vecsize) const
 
void Init (const char *pattern, Option option, int match_limit, int stack_limit, bool report_errors)
 
void Init (const char *pattern, Option option, int match_limit, int stack_limit, bool report_errors)
 
PCREoperator= (const PCRE &)=delete
 
PCREoperator= (const PCRE &)=delete
 
 PCRE (const PCRE &)=delete
 
 PCRE (const PCRE &)=delete
 
bool Rewrite (std::string *out, const StringPiece &rewrite, const StringPiece &text, int *vec, int veclen) const
 
bool Rewrite (std::string *out, const StringPiece &rewrite, const StringPiece &text, int *vec, int veclen) const
 
int TryMatch (const StringPiece &text, size_t startpos, Anchor anchor, bool empty_ok, int *vec, int vecsize) const
 
int TryMatch (const StringPiece &text, size_t startpos, Anchor anchor, bool empty_ok, int *vec, int vecsize) const
 

Private Attributes

const std::string * error_
 
int32_t hit_limit_
 
int match_limit_
 
Option options_
 
std::string pattern_
 
pcre * re_full_
 
pcre * re_partial_
 
bool report_errors_
 
int stack_limit_
 

Detailed Description

Definition at line 186 of file bloaty/third_party/re2/util/pcre.h.

Member Enumeration Documentation

◆ Anchor [1/2]

Enumerator
UNANCHORED 
ANCHOR_START 
ANCHOR_BOTH 
UNANCHORED 
ANCHOR_START 
ANCHOR_BOTH 

Definition at line 436 of file bloaty/third_party/re2/util/pcre.h.

◆ Anchor [2/2]

Enumerator
UNANCHORED 
ANCHOR_START 
ANCHOR_BOTH 
UNANCHORED 
ANCHOR_START 
ANCHOR_BOTH 

Definition at line 436 of file re2/util/pcre.h.

◆ Option [1/2]

Enumerator
None 
UTF8 
EnabledCompileOptions 
EnabledExecOptions 
None 
UTF8 
EnabledCompileOptions 
EnabledExecOptions 

Definition at line 204 of file re2/util/pcre.h.

◆ Option [2/2]

Enumerator
None 
UTF8 
EnabledCompileOptions 
EnabledExecOptions 
None 
UTF8 
EnabledCompileOptions 
EnabledExecOptions 

Definition at line 204 of file bloaty/third_party/re2/util/pcre.h.

Constructor & Destructor Documentation

◆ PCRE() [1/14]

re2::PCRE::PCRE ( const char *  pattern)

Definition at line 128 of file bloaty/third_party/re2/util/pcre.cc.

◆ PCRE() [2/14]

re2::PCRE::PCRE ( const char *  pattern,
Option  option 
)

Definition at line 131 of file bloaty/third_party/re2/util/pcre.cc.

◆ PCRE() [3/14]

re2::PCRE::PCRE ( const std::string &  pattern)

Definition at line 134 of file bloaty/third_party/re2/util/pcre.cc.

◆ PCRE() [4/14]

re2::PCRE::PCRE ( const std::string &  pattern,
Option  option 
)

Definition at line 137 of file bloaty/third_party/re2/util/pcre.cc.

◆ PCRE() [5/14]

re2::PCRE::PCRE ( const char *  pattern,
const PCRE_Options re_option 
)

Definition at line 145 of file bloaty/third_party/re2/util/pcre.cc.

◆ PCRE() [6/14]

re2::PCRE::PCRE ( const std::string &  pattern,
const PCRE_Options re_option 
)

Definition at line 140 of file bloaty/third_party/re2/util/pcre.cc.

◆ ~PCRE() [1/2]

re2::PCRE::~PCRE ( )

Definition at line 150 of file bloaty/third_party/re2/util/pcre.cc.

◆ PCRE() [7/14]

re2::PCRE::PCRE ( const PCRE )
privatedelete

◆ PCRE() [8/14]

re2::PCRE::PCRE ( const char *  pattern)

◆ PCRE() [9/14]

re2::PCRE::PCRE ( const char *  pattern,
Option  option 
)

◆ PCRE() [10/14]

re2::PCRE::PCRE ( const std::string &  pattern)

◆ PCRE() [11/14]

re2::PCRE::PCRE ( const std::string &  pattern,
Option  option 
)

◆ PCRE() [12/14]

re2::PCRE::PCRE ( const char *  pattern,
const PCRE_Options re_option 
)

◆ PCRE() [13/14]

re2::PCRE::PCRE ( const std::string &  pattern,
const PCRE_Options re_option 
)

◆ ~PCRE() [2/2]

re2::PCRE::~PCRE ( )

◆ PCRE() [14/14]

re2::PCRE::PCRE ( const PCRE )
privatedelete

Member Function Documentation

◆ CheckRewriteString() [1/2]

bool re2::PCRE::CheckRewriteString ( const StringPiece rewrite,
std::string *  error 
) const

Definition at line 708 of file bloaty/third_party/re2/util/pcre.cc.

◆ CheckRewriteString() [2/2]

bool re2::PCRE::CheckRewriteString ( const StringPiece rewrite,
std::string *  error 
) const

◆ ClearHitLimit() [1/2]

void re2::PCRE::ClearHitLimit ( )

Definition at line 508 of file bloaty/third_party/re2/util/pcre.cc.

◆ ClearHitLimit() [2/2]

void re2::PCRE::ClearHitLimit ( )

◆ Compile() [1/2]

pcre * re2::PCRE::Compile ( Anchor  anchor)
private

Definition at line 156 of file bloaty/third_party/re2/util/pcre.cc.

◆ Compile() [2/2]

pcre* re2::PCRE::Compile ( Anchor  anchor)
private

◆ DoMatch() [1/2]

bool re2::PCRE::DoMatch ( const StringPiece text,
Anchor  anchor,
size_t *  consumed,
const Arg *const args,
int  n 
) const

◆ DoMatch() [2/2]

bool re2::PCRE::DoMatch ( const StringPiece text,
Anchor  anchor,
size_t *  consumed,
const Arg *const args,
int  n 
) const

◆ DoMatchImpl() [1/2]

bool re2::PCRE::DoMatchImpl ( const StringPiece text,
Anchor  anchor,
size_t *  consumed,
const Arg *const  args[],
int  n,
int vec,
int  vecsize 
) const
private

◆ DoMatchImpl() [2/2]

bool re2::PCRE::DoMatchImpl ( const StringPiece text,
Anchor  anchor,
size_t *  consumed,
const Arg *const  args[],
int  n,
int vec,
int  vecsize 
) const
private

◆ error() [1/2]

const std::string& re2::PCRE::error ( ) const
inline

Definition at line 229 of file re2/util/pcre.h.

◆ error() [2/2]

const std::string& re2::PCRE::error ( ) const
inline

Definition at line 229 of file bloaty/third_party/re2/util/pcre.h.

◆ Extract() [1/2]

static bool re2::PCRE::Extract ( const StringPiece text,
const PCRE pattern,
const StringPiece rewrite,
std::string *  out 
)
static

◆ Extract() [2/2]

bool re2::PCRE::Extract ( const StringPiece text,
const PCRE pattern,
const StringPiece rewrite,
std::string *  out 
)
static

Definition at line 455 of file bloaty/third_party/re2/util/pcre.cc.

◆ GlobalReplace() [1/2]

static int re2::PCRE::GlobalReplace ( std::string *  str,
const PCRE pattern,
const StringPiece rewrite 
)
static

◆ GlobalReplace() [2/2]

int re2::PCRE::GlobalReplace ( std::string *  str,
const PCRE pattern,
const StringPiece rewrite 
)
static

Definition at line 397 of file bloaty/third_party/re2/util/pcre.cc.

◆ HitLimit() [1/2]

bool re2::PCRE::HitLimit ( )

◆ HitLimit() [2/2]

bool re2::PCRE::HitLimit ( )

Definition at line 504 of file bloaty/third_party/re2/util/pcre.cc.

◆ Init() [1/2]

void re2::PCRE::Init ( const char *  pattern,
Option  option,
int  match_limit,
int  stack_limit,
bool  report_errors 
)
private

Definition at line 104 of file bloaty/third_party/re2/util/pcre.cc.

◆ Init() [2/2]

void re2::PCRE::Init ( const char *  pattern,
Option  option,
int  match_limit,
int  stack_limit,
bool  report_errors 
)
private

◆ NumberOfCapturingGroups() [1/2]

int re2::PCRE::NumberOfCapturingGroups ( ) const

◆ NumberOfCapturingGroups() [2/2]

int re2::PCRE::NumberOfCapturingGroups ( ) const

Definition at line 749 of file bloaty/third_party/re2/util/pcre.cc.

◆ operator=() [1/2]

PCRE& re2::PCRE::operator= ( const PCRE )
privatedelete

◆ operator=() [2/2]

PCRE& re2::PCRE::operator= ( const PCRE )
privatedelete

◆ pattern() [1/2]

const std::string& re2::PCRE::pattern ( ) const
inline

Definition at line 225 of file bloaty/third_party/re2/util/pcre.h.

◆ pattern() [2/2]

const std::string& re2::PCRE::pattern ( ) const
inline

Definition at line 225 of file re2/util/pcre.h.

◆ QuoteMeta() [1/2]

std::string re2::PCRE::QuoteMeta ( const StringPiece unquoted)
static

Definition at line 467 of file bloaty/third_party/re2/util/pcre.cc.

◆ QuoteMeta() [2/2]

static std::string re2::PCRE::QuoteMeta ( const StringPiece unquoted)
static

◆ Replace() [1/2]

bool re2::PCRE::Replace ( std::string *  str,
const PCRE pattern,
const StringPiece rewrite 
)
static

Definition at line 379 of file bloaty/third_party/re2/util/pcre.cc.

◆ Replace() [2/2]

static bool re2::PCRE::Replace ( std::string *  str,
const PCRE pattern,
const StringPiece rewrite 
)
static

◆ Rewrite() [1/2]

bool re2::PCRE::Rewrite ( std::string *  out,
const StringPiece rewrite,
const StringPiece text,
int vec,
int  veclen 
) const
private

◆ Rewrite() [2/2]

bool re2::PCRE::Rewrite ( std::string *  out,
const StringPiece rewrite,
const StringPiece text,
int vec,
int  veclen 
) const
private

Definition at line 672 of file bloaty/third_party/re2/util/pcre.cc.

◆ TryMatch() [1/2]

int re2::PCRE::TryMatch ( const StringPiece text,
size_t  startpos,
Anchor  anchor,
bool  empty_ok,
int vec,
int  vecsize 
) const
private

Definition at line 512 of file bloaty/third_party/re2/util/pcre.cc.

◆ TryMatch() [2/2]

int re2::PCRE::TryMatch ( const StringPiece text,
size_t  startpos,
Anchor  anchor,
bool  empty_ok,
int vec,
int  vecsize 
) const
private

Member Data Documentation

◆ Consume

static const ConsumeFunctor re2::PCRE::Consume = { }
static

Definition at line 338 of file bloaty/third_party/re2/util/pcre.h.

◆ error_

const std::string * re2::PCRE::error_
private

Definition at line 499 of file bloaty/third_party/re2/util/pcre.h.

◆ FindAndConsume

static const FindAndConsumeFunctor re2::PCRE::FindAndConsume = { }
static

Definition at line 364 of file bloaty/third_party/re2/util/pcre.h.

◆ FullMatch

static const FullMatchFunctor re2::PCRE::FullMatch = { }
static

Definition at line 289 of file bloaty/third_party/re2/util/pcre.h.

◆ hit_limit_

int32_t re2::PCRE::hit_limit_
mutableprivate

Definition at line 503 of file bloaty/third_party/re2/util/pcre.h.

◆ match_limit_

int re2::PCRE::match_limit_
private

Definition at line 501 of file bloaty/third_party/re2/util/pcre.h.

◆ no_more_args

static Arg re2::PCRE::no_more_args
static

Definition at line 189 of file bloaty/third_party/re2/util/pcre.h.

◆ options_

Option re2::PCRE::options_
private

Definition at line 496 of file bloaty/third_party/re2/util/pcre.h.

◆ PartialMatch

static const PartialMatchFunctor re2::PCRE::PartialMatch = { }
static

Definition at line 313 of file bloaty/third_party/re2/util/pcre.h.

◆ pattern_

std::string re2::PCRE::pattern_
private

Definition at line 495 of file bloaty/third_party/re2/util/pcre.h.

◆ re_full_

pcre * re2::PCRE::re_full_
private

Definition at line 497 of file bloaty/third_party/re2/util/pcre.h.

◆ re_partial_

pcre * re2::PCRE::re_partial_
private

Definition at line 498 of file bloaty/third_party/re2/util/pcre.h.

◆ report_errors_

bool re2::PCRE::report_errors_
private

Definition at line 500 of file bloaty/third_party/re2/util/pcre.h.

◆ stack_limit_

int re2::PCRE::stack_limit_
private

Definition at line 502 of file bloaty/third_party/re2/util/pcre.h.


The documentation for this class was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:42