online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <regex> int main() { //Regex objects //std::regex obj = std::regex("a"); //std::regex obj = std::regex("z"); // . checks any character - metacharacters: https://www.regular-expressions.info/characters.html#special //std::regex obj = std::regex("."); // ? is a quantifier meaning 0 or one occurences of the preceding regex atom: repetition operator //std::regex obj = std::regex("a?"); // + is a quantifier meaning 1 or more occurences of the preceding regex atom //std::regex obj = std::regex("z+"); // * is a quantifier meaning 0 or more occurences of the preceding regex atom //std::regex obj = std::regex("z*"); // ^ means starting //std::regex obj = std::regex("^z"); // $ means ending //std::regex obj = std::regex("z$"); // class //std::regex obj = std::regex("[A-Za-z0-9]"); //check if the string is numeric // Checking if a name has lower cases or spaces //std::regex obj = std::regex("^[a-z\\s]+$"); std::string myText = std::string("hello world."); bool myTextContainsRegex = std::regex_search(myText, obj); std::cout << std::boolalpha << myTextContainsRegex << '\n'; // Regex search vs match //https://www.fluentcpp.com/2020/02/28/c-regex-101-simple-code-for-simple-cases-with-regexes/ }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue