#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) const |
Array< bool > | is_match (const string_vector &buffer) const |
match_data | match (const std::string &buffer) const |
regexp & | operator= (const regexp &rx)=default |
std::string | replace (const std::string &buffer, const std::string &replacement) const |
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 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_code |
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 121 of file lo-regexp.cc.
References string_vector::append(), regexp::opts::case_insensitive(), regexp::opts::dotexceptnewline(), free(), regexp::opts::freespacing(), regexp::opts::lineanchors(), lookbehind_warned, m_code, m_named_idx, m_named_pats, m_names, m_options, m_pattern, m_who, MAXLOOKBEHIND, and Array< T, Alloc >::resize().
|
private |
bool regexp::is_match | ( | const std::string & | buffer | ) | const |
Definition at line 580 of file lo-regexp.cc.
References match(), and base_list< elt_type >::size().
Referenced by symbol_table::clear_function_regexp(), call_stack::clear_global_variable_regexp(), symbol_cleaner::clear_symbols(), call_stack::do_global_who_two(), symbol_info_accumulator::filter(), is_match(), name_matches_any_pattern(), and 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 > regexp::is_match | ( | const string_vector & | buffer | ) | const |
Definition at line 588 of file lo-regexp.cc.
References is_match(), len, and string_vector::numel().
regexp::match_data regexp::match | ( | const std::string & | buffer | ) | const |
Definition at line 328 of file lo-regexp.cc.
References current_liboctave_error_handler, regexp::opts::emptymatch(), len, m_code, m_named_idx, m_named_pats, m_names, m_options, m_who, OCTAVE_LOCAL_BUFFER, octave_pcre_pattern_info(), octave_u8_check_wrapper(), regexp::opts::once(), PCRE_MATCHLIMIT_MAX, and Matrix::resize().
Referenced by is_match(), match(), octregexp(), and replace().
|
inlinestatic |
Definition at line 84 of file lo-regexp.h.
References match().
std::string regexp::replace | ( | const std::string & | buffer, |
const std::string & | replacement | ||
) | const |
Definition at line 608 of file lo-regexp.cc.
References base_list< elt_type >::begin(), match(), rep_token_t::num, rep_token_t::pos, Array< T, Alloc >::rows(), and 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 232 of file lo-regexp.h.
Referenced by compile_internal(), free(), and match().
|
private |
Definition at line 236 of file lo-regexp.h.
Referenced by compile_internal(), and match().
|
private |
Definition at line 234 of file lo-regexp.h.
Referenced by compile_internal(), and match().
|
private |
Definition at line 235 of file lo-regexp.h.
Referenced by compile_internal(), and match().
|
private |
Definition at line 229 of file lo-regexp.h.
Referenced by compile_internal(), and match().
|
private |
Definition at line 227 of file lo-regexp.h.
Referenced by compile_internal().
|
private |
Definition at line 237 of file lo-regexp.h.
Referenced by compile_internal(), and match().