#include "lo-regexp.h"
Classes | |
class | match_data |
class | match_element |
class | 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()) |
bool | is_match (const std::string &buffer) |
Array< bool > | is_match (const string_vector &buffer) |
match_data | match (const std::string &buffer) |
regexp & | operator= (const regexp &rx) |
std::string | replace (const std::string &buffer, const std::string &replacement) |
Static Public Member Functions | |
static bool | is_match (const std::string &pat, const std::string &buffer, const regexp::opts &opt=regexp::opts(), const std::string &who="regexp") |
static Array< bool > | is_match (const std::string &pat, const string_vector &buffer, const regexp::opts &opt=regexp::opts(), const std::string &who="regexp") |
static regexp::match_data | match (const std::string &pat, const std::string &buffer, const regexp::opts &opt=regexp::opts(), const std::string &who="regexp") |
static std::string | replace (const std::string &pat, const std::string &buffer, const std::string &replacement, const regexp::opts &opt=regexp::opts(), const std::string &who="regexp") |
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 40 of file lo-regexp.h.
|
inline |
Definition at line 49 of file lo-regexp.h.
|
inline |
Definition at line 58 of file lo-regexp.h.
|
inline |
Definition at line 77 of file lo-regexp.h.
|
inline |
Definition at line 79 of file lo-regexp.h.
|
private |
Definition at line 70 of file lo-regexp.cc.
References string_vector::append(), octave::regexp::opts::case_insensitive(), data, octave::regexp::opts::dotexceptnewline(), err, found, free(), octave::regexp::opts::freespacing(), i, octave::regexp::opts::lineanchors(), lookbehind_warned, MAXLOOKBEHIND, named_idx, named_pats, nnames, options, pattern, Array< T >::resize(), string, and who.
|
private |
bool octave::regexp::is_match | ( | const std::string & | buffer | ) |
Definition at line 430 of file lo-regexp.cc.
References match(), and octave::base_list< elt_type >::size().
Referenced by is_match(), and octave::symbol_scope_rep::regexp().
Array< bool > octave::regexp::is_match | ( | const string_vector & | buffer | ) |
Definition at line 438 of file lo-regexp.cc.
References i, is_match(), Array< T >::numel(), and retval.
|
inlinestatic |
Definition at line 107 of file lo-regexp.h.
References is_match().
|
inlinestatic |
Definition at line 117 of file lo-regexp.h.
References is_match().
regexp::match_data octave::regexp::match | ( | const std::string & | buffer | ) |
Definition at line 247 of file lo-regexp.cc.
References data, octave::regexp::opts::emptymatch(), i, named_idx, named_pats, nnames, OCTAVE_LOCAL_BUFFER, octave::regexp::opts::once(), options, PCRE_MATCHLIMIT_MAX, Matrix::resize(), retval, start, string, and who.
Referenced by is_match(), match(), octregexp(), and replace().
|
inlinestatic |
Definition at line 97 of file lo-regexp.h.
References match().
Definition at line 63 of file lo-regexp.h.
References data, named_idx, named_pats, nnames, pattern(), and pattern.
std::string octave::regexp::replace | ( | const std::string & | buffer, |
const std::string & | replacement | ||
) |
Definition at line 458 of file lo-regexp.cc.
References Matrix::append(), octave::base_list< elt_type >::begin(), i, k, match(), octave::rep_token_t::num, p, octave::rep_token_t::pos, retval, octave::base_list< elt_type >::size(), start, and string.
Referenced by replace().
|
inlinestatic |
Definition at line 127 of file lo-regexp.h.
References replace().
|
private |
Definition at line 276 of file lo-regexp.h.
Referenced by compile_internal(), free(), match(), and operator=().
|
private |
Definition at line 278 of file lo-regexp.h.
|
private |
Definition at line 281 of file lo-regexp.h.
Referenced by compile_internal(), match(), and operator=().
|
private |
Definition at line 279 of file lo-regexp.h.
Referenced by compile_internal(), match(), and operator=().
|
private |
Definition at line 280 of file lo-regexp.h.
Referenced by compile_internal(), match(), and operator=().
|
private |
Definition at line 273 of file lo-regexp.h.
Referenced by compile_internal(), and match().
|
private |
Definition at line 271 of file lo-regexp.h.
Referenced by compile_internal(), and operator=().
|
private |
Definition at line 282 of file lo-regexp.h.
Referenced by compile_internal(), and match().