#include <iostream>
#include <dirent.h>
#include <regex>
#include <vector>
#include <string>

using namespace std;

int main(void){
	vector<string> dir{".","..",".test","test.txt", "text" };

    string rgs="^\\.";
    cout <<rgs<<endl; 
    regex self_regex(rgs);
    for (auto &x:dir) {
        if (regex_search(x,self_regex)){
            cout << "matches regex" << x << endl;
        }
        else{
                cout << "does not match regex " << x << endl;
        }
    }
    return 0;
}