Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
缓冲区字符串char *bufferString指向以下字符串的第一个元素:
char *bufferString
BER Berman, Jane 06/29/91 摄影;舞蹈;音乐\n
我想仅解析主题最后一个主题列表的每个项目并存储它们
我试过的:
#define REGEX_TOPIC "^[a-zA-Z].*^[0-9/0-90-9/0-90-9+]" char *topic; topic = strstr(bufferString, REGEX_TOPIC);
你能帮帮我吗?
该strstr()函数定位空终止字符串中第一次出现的空s2终止字符串s1。它不处理正则表达式。
strstr()
s2
s1
有关在 C 中使用正则表达式,请参阅 C 中的正则表达式的答案:示例?.