文件名称:stringmatching
介绍说明--下载内容均来自于网络,请自行研究使用
可以采用正则表达式来实现字符串匹配功能。一种简单的正则表达式是由英文字母(区分大小写)、数字及通配符"*"和"?"任意组合而成的。"?"代表任意一个字符,"*"代表零个或任意多个字符。例如,a*b可以匹配acb,aabb,afdfdb,ab等,但不可以匹配ac,bb,abbc;a?b可以匹配acb,abb,但不可以匹配ab,accb。试编写一个程序,从文件中读入N个字符串,再从键盘上读入任意一个合乎规则的正则表达式,例如:"a?bb*d",输出符合正则表达式的字符串。
查询的字典文件为test.txt,可以自己修改-Regular expressions can be used to implement string matching capabilities. A simple regular expression from the English letters (case sensitive), numbers and wildcard "*" and, " ?" Arbitrary combination. " ?" Represents any one character, "*" represents zero or any number of characters. Example, a* b match acb, aabb, afdfdb, ab and so on, but not match the ac, bb, abbc a? B can match acb, abb, but not match ab, accb. Try to write a program read from a file into the N string, and then read from the keyboard, on a line with any of the rules of regular expressions, such as: " a? Bb* d" , the output in line with regular expression string. Query dictionary file test.txt, you can modify their own
查询的字典文件为test.txt,可以自己修改-Regular expressions can be used to implement string matching capabilities. A simple regular expression from the English letters (case sensitive), numbers and wildcard "*" and, " ?" Arbitrary combination. " ?" Represents any one character, "*" represents zero or any number of characters. Example, a* b match acb, aabb, afdfdb, ab and so on, but not match the ac, bb, abbc a? B can match acb, abb, but not match ab, accb. Try to write a program read from a file into the N string, and then read from the keyboard, on a line with any of the rules of regular expressions, such as: " a? Bb* d" , the output in line with regular expression string. Query dictionary file test.txt, you can modify their own
(系统自动生成,下载前可以参看下载内容)
下载文件列表
pipeijiance.cpp
test.txt
readme.txt
test.txt
readme.txt