File Regex.h

Copyright

This code is licensed under the 3-clause BSD license.

Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.

See LICENSE.txt for details.

namespace Scine

This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.

This header contains alias definitions defining which classes to use for the different degrees of derivatives.

namespace Utils
namespace Regex

Helpers for std::regex.

The functions deliver regular expression building blocks to be used when composing regular expressions. Functions starting with “capturing” add a parenthesis to capture the value.

Functions

std::string lineBegin()

Regex code for the beginning of a line.

Return

std::string Returns Regex code for the beginning of a line.

std::string lineEnd()

Regex code for the end of a line.

Return

std::string Returns Regex code for the end of a line.

std::string floatingPointNumber()

Regex code for a floating point number.

Return

std::string Returns Regex code for a floating point number.

std::string capturingFloatingPointNumber()

Regex code for a floating point number including capture.

Return

std::string Returns Regex code for a floating point number including capture.

std::string integerNumber()

Regex code for an integer number.

Return

std::string Returns Regex code for an integer number.

std::string capturingIntegerNumber()

Regex code for an integer number including capture.

Return

std::string Returns Regex code for an integer number including capture.

std::string addCaptureParenthesis(const std::string &s)

Adds capture paranteses to any string.

Return

std::string Returns the string s with capture parenthesis added.

Parameters
  • s: The Regex string describing the type to be captured.