Originally Posted by Subsonics Have you tried strnstr()? Then you can restrict the length. when i use strnstr() it gives the following error (.text+0xbd): undefined reference to `strnstr' collect2: ld returned 1 exit status