Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

StringTokenizer and Pattern Matching

Status
Not open for further replies.

supervi

MIS
Mar 22, 2003
61
0
0
CA
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.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top