Hi all,
I'm trying to write a program which compares a regular expression to a string.
In the problem, a regular expression will be a series of lower case letters (a-z) or asterisks (*). The asterisks are wildcards. A string for this problem will be a series of lower case letters.
I'm reading in a file and the 1st line is the expression, the 2nd line is the string. This repeats as 3rd line is the expression and the 4th line is the string and so on. So,
line 1 >> *
line 2 >> abcde --> Match
line 3 >> *abc
line 4 >> aaabbbccabc --> Match
I would appreciate some hints on where to begin in order to solve this problem. Thanks in advance for any help.
I'm trying to write a program which compares a regular expression to a string.
In the problem, a regular expression will be a series of lower case letters (a-z) or asterisks (*). The asterisks are wildcards. A string for this problem will be a series of lower case letters.
I'm reading in a file and the 1st line is the expression, the 2nd line is the string. This repeats as 3rd line is the expression and the 4th line is the string and so on. So,
line 1 >> *
line 2 >> abcde --> Match
line 3 >> *abc
line 4 >> aaabbbccabc --> Match
I would appreciate some hints on where to begin in order to solve this problem. Thanks in advance for any help.