Hello the code is located at http://susepaste.org/74036237 due to it's length.
I'm trying to preform a grep like function on text and can't seem to figure out how to find what part of the text matched. The code compiles without a problem. I get:
And when I change the string so that it does not match I get:
Now the string does not contain two occurrences of "is", so what's up?
I tried solving this one for myself by downloading the source for grep but it does not use the glibc facilities for printing what parts of a string match (and the sources are quite large.)
I'm trying to preform a grep like function on text and can't seem to figure out how to find what part of the text matched. The code compiles without a problem. I get:
Code:
Number of sub expressions is 1
Regerror reports Success
Part of match: is is string numb
Part of match: is is string numb
Code:
Number of sub expressions is 1
No match.
Regerror reports No match
Part of match:
Part of match:
I tried solving this one for myself by downloading the source for grep but it does not use the glibc facilities for printing what parts of a string match (and the sources are quite large.)