#include "regexp.h"
Classes | |
class | match_data |
class | match_element |
struct | opts |
Public Member Functions | |
regexp (const std::string &pat="", const regexp::opts &opt=regexp::opts(), const std::string &w="regexp") | |
regexp (const regexp &rx) | |
~regexp (void) | |
void | compile (const std::string &pat, const regexp::opts &opt=regexp::opts()) |
Array< bool > | is_match (const string_vector &buffer) |
bool | is_match (const std::string &buffer) |
match_data | match (const std::string &buffer) |
regexp & | operator= (const regexp &rx) |
std::string | replace (const std::string &buffer, const std::string &replacement) |
Private Member Functions | |
void | compile_internal (void) |
void | free (void) |
Private Attributes | |
void * | data |
std::string | m |
Array< int > | named_idx |
string_vector | named_pats |
int | nnames |
opts | options |
std::string | pattern |
std::string | who |
Definition at line 36 of file regexp.h.
regexp::regexp | ( | const std::string & | pat = "" , |
|
const regexp::opts & | opt = regexp::opts () , |
|||
const std::string & | w = "regexp" | |||
) | [inline] |
Definition at line 43 of file regexp.h.
References compile_internal().
void regexp::compile | ( | const std::string & | pat, | |
const regexp::opts & | opt = regexp::opts () | |||
) | [inline] |
Definition at line 73 of file regexp.h.
References compile_internal(), options, and pattern.
void regexp::compile_internal | ( | void | ) | [private] |
Definition at line 68 of file regexp.cc.
References string_vector::append(), regexp::opts::case_insensitive(), data, regexp::opts::dotexceptnewline(), free(), regexp::opts::freespacing(), regexp::opts::lineanchors(), lookbehind_warned, named_idx, named_pats, nnames, options, pattern, Array< T >::resize(), and who.
void regexp::free | ( | void | ) | [private] |
Definition at line 61 of file regexp.cc.
References data.
Referenced by compile_internal(), and ~regexp().
bool regexp::is_match | ( | const std::string & | buffer | ) |
Definition at line 417 of file regexp.cc.
References octave_base_list< elt_type >::begin(), and match().
Referenced by is_match(), and is_regexp_match().
Array< bool > regexp::is_match | ( | const string_vector & | buffer | ) |
Definition at line 429 of file regexp.cc.
References is_match(), and Array< T >::length().
regexp::match_data regexp::match | ( | const std::string & | buffer | ) |
Definition at line 242 of file regexp.cc.
References data, named_idx, named_pats, nnames, OCTAVE_LOCAL_BUFFER, regexp::opts::once(), options, PCRE_MATCHLIMIT_MAX, Matrix::resize(), and who.
Referenced by is_match(), regexp_match(), and replace().
std::string regexp::replace | ( | const std::string & | buffer, | |
const std::string & | replacement | |||
) |
Definition at line 442 of file regexp.cc.
References octave_base_list< elt_type >::begin(), match(), and octave_base_list< elt_type >::size().
Referenced by regexp_replace().
void* regexp::data [private] |
Definition at line 223 of file regexp.h.
Referenced by compile_internal(), free(), match(), and operator=().
Array<int> regexp::named_idx [private] |
Definition at line 228 of file regexp.h.
Referenced by compile_internal(), match(), and operator=().
string_vector regexp::named_pats [private] |
Definition at line 226 of file regexp.h.
Referenced by compile_internal(), match(), and operator=().
int regexp::nnames [private] |
Definition at line 227 of file regexp.h.
Referenced by compile_internal(), match(), and operator=().
opts regexp::options [private] |
Definition at line 220 of file regexp.h.
Referenced by compile(), compile_internal(), and match().
std::string regexp::pattern [private] |
Definition at line 218 of file regexp.h.
Referenced by compile(), compile_internal(), and operator=().
std::string regexp::who [private] |
Definition at line 229 of file regexp.h.
Referenced by compile_internal(), and match().