#include "lo-regexp.h"
Classes | |
class | match_data |
class | match_element |
class | opts |
Public Member Functions | |
regexp (const regexp &)=default | |
regexp (const std::string &pat="", const regexp::opts &opt=regexp::opts(), const std::string &w="regexp") | |
~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)=default |
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 * | m_data |
Array< int > | m_named_idx |
string_vector | m_named_pats |
int | m_names |
opts | m_options |
std::string | m_pattern |
std::string | m_who |
Definition at line 42 of file lo-regexp.h.
|
inline |
Definition at line 51 of file lo-regexp.h.
|
default |
|
inline |
Definition at line 64 of file lo-regexp.h.
References free().
|
inline |
Definition at line 66 of file lo-regexp.h.
|
private |
Definition at line 72 of file lo-regexp.cc.
References string_vector::append(), octave::regexp::opts::case_insensitive(), octave::regexp::opts::dotexceptnewline(), free(), octave::regexp::opts::freespacing(), octave::regexp::opts::lineanchors(), octave::lookbehind_warned, m_data, m_named_idx, m_named_pats, m_names, m_options, m_pattern, m_who, MAXLOOKBEHIND, and Array< T >::resize().
|
private |
bool octave::regexp::is_match | ( | const std::string & | buffer | ) |
Definition at line 440 of file lo-regexp.cc.
References match(), and octave::base_list< elt_type >::size().
Referenced by octave::symbol_table::clear_function_regexp(), octave::call_stack::clear_global_variable_regexp(), octave::symbol_cleaner::clear_symbols(), octave::call_stack::do_global_who_two(), octave::symbol_info_accumulator::filter(), is_match(), name_matches_any_pattern(), and octave::sys::file_stat::update_internal().
|
inlinestatic |
Definition at line 94 of file lo-regexp.h.
References is_match().
|
inlinestatic |
Definition at line 104 of file lo-regexp.h.
References is_match().
Array< bool > octave::regexp::is_match | ( | const string_vector & | buffer | ) |
Definition at line 448 of file lo-regexp.cc.
References is_match(), len, string_vector::numel(), and retval.
regexp::match_data octave::regexp::match | ( | const std::string & | buffer | ) |
Definition at line 250 of file lo-regexp.cc.
References current_liboctave_error_handler, octave::regexp::opts::emptymatch(), len, m_data, m_named_idx, m_named_pats, m_names, m_options, m_who, OCTAVE_LOCAL_BUFFER, octave_u8_check_wrapper(), octave::regexp::opts::once(), PCRE_MATCHLIMIT_MAX, Matrix::resize(), and retval.
Referenced by is_match(), match(), octregexp(), and replace().
|
inlinestatic |
Definition at line 84 of file lo-regexp.h.
References match().
std::string octave::regexp::replace | ( | const std::string & | buffer, |
const std::string & | replacement | ||
) |
Definition at line 468 of file lo-regexp.cc.
References octave::base_list< elt_type >::begin(), match(), octave::rep_token_t::num, octave::rep_token_t::pos, retval, Array< T >::rows(), and octave::base_list< elt_type >::size().
Referenced by octregexprep(), and replace().
|
inlinestatic |
Definition at line 114 of file lo-regexp.h.
References replace().
|
private |
Definition at line 228 of file lo-regexp.h.
Referenced by compile_internal(), free(), and match().
|
private |
Definition at line 232 of file lo-regexp.h.
Referenced by compile_internal(), and match().
|
private |
Definition at line 230 of file lo-regexp.h.
Referenced by compile_internal(), and match().
|
private |
Definition at line 231 of file lo-regexp.h.
Referenced by compile_internal(), and match().
|
private |
Definition at line 225 of file lo-regexp.h.
Referenced by compile_internal(), and match().
|
private |
Definition at line 223 of file lo-regexp.h.
Referenced by compile_internal().
|
private |
Definition at line 233 of file lo-regexp.h.
Referenced by compile_internal(), and match().