/
regmatch.cpp
58 lines (45 loc) · 1008 Bytes
/
regmatch.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class RegLetNode{
public:
string value;
RegLetNode* previous;
RegLetNode* next;
};
class Solution {
private:
public:
bool isMatch(std::string s, std::string p,vector<int> &node) {
int i = 0;
for (int j = 0; j<p.length();j++)
{
}
return true;
}
};
int main(){
Solution s;
bool match;
vector<int> v;
std::string _one = "mississippi";
std::string _two = "mis*is*p*i.";
/* match = s.isMatch(_one,_two);
std::cout<<match<<std::endl;
_one = "ab";
_two = "a*";
match = s.isMatch(_one,_two);
std::cout<<match<<std::endl;
_one = "abc";
_two = "ab*";
match = s.isMatch(_one,_two);
std::cout<<match<<std::endl;
*/
_one = "ab";
_two = "a*";
RegLetNode *currNode;
match = s.isMatch(_one,_two,v);
std::cout<<match<<std::endl;
return 0;
}