GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
regexp Class Reference

#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 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
 
regexpoperator= (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")
 

Detailed Description

Definition at line 42 of file lo-regexp.h.

Constructor & Destructor Documentation

◆ regexp() [1/2]

regexp::regexp ( const std::string &  pat = "",
const regexp::opts opt = regexp::opts (),
const std::string &  w = "regexp" 
)
inline

Definition at line 51 of file lo-regexp.h.

◆ regexp() [2/2]

regexp::regexp ( const regexp )
default

◆ ~regexp()

regexp::~regexp ( )
inline

Definition at line 64 of file lo-regexp.h.

References free().

Member Function Documentation

◆ compile()

void regexp::compile ( const std::string &  pat,
const regexp::opts opt = regexp::opts () 
)
inline

Definition at line 66 of file lo-regexp.h.

◆ is_match() [1/4]

bool regexp::is_match ( const std::string &  buffer) const

◆ is_match() [2/4]

static bool regexp::is_match ( const std::string &  pat,
const std::string &  buffer,
const regexp::opts opt = regexp::opts (),
const std::string &  who = "regexp" 
)
inlinestatic

Definition at line 94 of file lo-regexp.h.

References is_match().

◆ is_match() [3/4]

static Array<bool> regexp::is_match ( const std::string &  pat,
const string_vector buffer,
const regexp::opts opt = regexp::opts (),
const std::string &  who = "regexp" 
)
inlinestatic

Definition at line 104 of file lo-regexp.h.

References is_match().

◆ is_match() [4/4]

Array< bool > regexp::is_match ( const string_vector buffer) const

Definition at line 592 of file lo-regexp.cc.

References is_match(), len, and string_vector::numel().

◆ match() [1/2]

regexp::match_data regexp::match ( const std::string &  buffer) const

Definition at line 328 of file lo-regexp.cc.

References current_liboctave_error_handler, and octave_u8_check_wrapper().

Referenced by is_match(), match(), and replace().

◆ match() [2/2]

static match_data regexp::match ( const std::string &  pat,
const std::string &  buffer,
const regexp::opts opt = regexp::opts (),
const std::string &  who = "regexp" 
)
inlinestatic

Definition at line 84 of file lo-regexp.h.

References match().

◆ operator=()

regexp& regexp::operator= ( const regexp rx)
default

◆ replace() [1/2]

std::string regexp::replace ( const std::string &  buffer,
const std::string &  replacement 
) const

◆ replace() [2/2]

static std::string regexp::replace ( const std::string &  pat,
const std::string &  buffer,
const std::string &  replacement,
const regexp::opts opt = regexp::opts (),
const std::string &  who = "regexp" 
)
inlinestatic

Definition at line 114 of file lo-regexp.h.

References replace().


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