32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/iosfwd.h>
35 #include <casacore/casa/BasicSL/String.h>
40 struct re_pattern_buffer;
friend ostream & operator<<(ostream &ios, const Regex &exp)
Write the regex string.
void operator=(const String &str)
Construct a new regex (using the default Regex constructor arguments).
const String & regexp() const
Get the regular expression string.
Regex()
Default constructor uses a zero-length regular expression.
String::size_type search(const Char *s, String::size_type len, Int &matchlen, Int pos=0) const
Test if the regular expression occurs anywhere in string s.
static String fromPattern(const String &pattern)
Convert a shell-like pattern to a regular expression string.
Bool fullMatch(const Char *s, String::size_type len) const
Test if the regular expression matches the entire string.
String::size_type searchBack(const Char *s, String::size_type len, Int &matchlen, uInt pos) const
Search backwards.
Regex(const String &exp, Bool fast=False, Bool toECMAScript=True)
Construct a regular expression from the string.
static String toEcma(const String &rx)
Convert the possibly old-style regex to the Ecma regex which means that unescaped [ and ] inside a br...
String::size_type find(const Char *s, String::size_type len, Int &matchlen, String::size_type pos=0) const
static String fromString(const String &str)
Convert a normal string to a regular expression string.
static String makeCaseInsensitive(const String &str)
Create a case-insensitive regular expression string from the given regular expression string.
static String fromSQLPattern(const String &pattern)
Convert an SQL-like pattern to a regular expression string.
String::size_type match(const Char *s, String::size_type len, String::size_type pos=0) const
Test if the regular expression matches (first part of) string s.
String: the storage and methods of handling collections of characters.
string::size_type size_type
this file contains all the compiler specific defines
TableExprNode pattern(const TableExprNode &node)
LatticeExprNode exp(const LatticeExprNode &expr)
TableExprNode regex(const TableExprNode &node)
Functions for regular expression matching and pattern matching.
bool Bool
Define the standard types used by Casacore.
const Regex RXwhite
some built in regular expressions