Untitled
#include<regex> #include<iostream> using namespace std; int main() { regex forma(R"(^\+355(69|68|67|66)\d{7}$)"); string numrat[4]={"+355688917424000","+355698410035","+5246060"}; int i; for(i=0; i<4; i++) { if(regex_search(numrat[i],forma)){ cout<<numrat[i] + " eshte numer shqipetar !"<<endl; } else cout<<numrat[i] + " NUK eshte numer shqipetar !"<<endl;; } return 0; }
Leave a Comment