我正在尝试编写一个程序,需要比较一组字符串与一个模板(本质上是一个字符串)。 我不确定术语是什么,但如果有帮助的话,它将更多地成为一个日志抓取程序。
输入字符串示例: 1. Hello World this is me 2. Hello Strange World this is a someone 3. This is a test file 4. Hello World this is a bot
要进行比较的内容如下: a. This is a ? file b. Hello World this is ?
思路是将输入语句(1-4)与模板字符串(a-b)进行匹配,如果匹配,则需要对它们进行操作。例如1和4匹配句子b,但2没有匹配。
感谢您提前的帮助/指引。
输入字符串示例: 1. Hello World this is me 2. Hello Strange World this is a someone 3. This is a test file 4. Hello World this is a bot
要进行比较的内容如下: a. This is a ? file b. Hello World this is ?
思路是将输入语句(1-4)与模板字符串(a-b)进行匹配,如果匹配,则需要对它们进行操作。例如1和4匹配句子b,但2没有匹配。
感谢您提前的帮助/指引。