On 9/18/2012 6:59 PM, Rudra Banerjee wrote:
> Sorry for posting two problem back to back.
> I have a file that contains line like:
> (2010) 4287-4293. doi:10.1016/j.physb.2010.07.028
> etc.
> where the doi:* is of importance to me.
> is there any way in C to get the string(even from the middle of line) begins with doi: and delimited only by space or newline?
Yes, but your lone example doesn't give enough information
about the pattern ("What's the next number in 9 ...?").
Possible building blocks: The strstr() function to locate
occurrences of "doi:" in the string, the strtok() function to
divide the string into space-separated fields, the sscanf()
function to, well, to scan. And others, of course.
--
Eric Sosman
d
"The speed at which the system fails is usually not important."