please expain this sentence "fscanf(fd, "%*[^\n]");"
What is the meaning of the *format* informaiton?
3ks
[解决办法]
"%[^\n] "表示读输入字符串,直到碰到字符‘\n’为止,其中^表示否的意思; "%[abc] "表示只读字母为 'a '、 'b '、 'c '的字符串,碰到不是这些字符就结束,如输入字符串为“abbacdab”,那么得到的字符串就是abbac了。
[解决办法]
利用正则表达式匹配。。某些 libc 的扩展。