This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::RegExp Class

Header: #include <UnigineRegExp.h>
Read More

RegExp Class

Members


static RegExpPtr create ( ) #

Default constructor that creates an empty instance.

static RegExpPtr create ( const char * pattern ) #

Constructor that creates a regular expression based on a provided pattern.

Arguments

  • const char * pattern - Pattern to be used for matching.

int isCompiled ( ) #

Returns a value indicating whether the current pattern is compiled and, therefore, can be used for matching.

Return value

1 if the pattern is compiled; otherwise, 0.

const char * getGroup ( int number ) #

Returns a partial match corresponding to a specified group. Groups are parts of a pattern that match different components; they are marked by parentheses (()) in the pattern. Groups are numbered starting with 0 from left to right.

Arguments

  • int number - A non-negative number of a desired group. The number should not exceed the value returned by getNumGroups().

Return value

Partial match corresponding to the group.

int getNumGroups ( ) #

Returns a number of groups in the current pattern. Groups are marked by parentheses (()) and are numbered starting with 0 from left to right.

Return value

Number of groups in the current pattern.

int compile ( const char * pattern ) #

Compiles a provided regular expression pattern. This expression will be used for future matches.

Arguments

  • const char * pattern - Pattern to be used for matching, etc.

Return value

1 if the pattern is compiled successfully; otherwise, 0.

int match ( const char * str ) #

Matches the pattern against a string.

Arguments

  • const char * str - String to match.

Return value

1 if the whole string is matched; otherwise, 0.

String replace ( const char * str, const char * after ) #

Searches for the pattern in a given string and replaces all its occurrences with another string.

Arguments

  • const char * str - String to search and replace in.
  • const char * after - Replacement string.

Return value

Modified string.

int search ( const char * str ) #

Searches for a sub-string matching the pattern in a given string.

Arguments

  • const char * str - String to search in.

Return value

Number of groups in the pattern, if a match is found; otherwise, 0.
Last update: 2019-08-16
Build: ()