Commit 9fc8d43a authored by Chris Allegretta's avatar Chris Allegretta
Browse files

New regexp search feature by Bill Soudan

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@78 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 6 additions and 1 deletion
+6 -1
......@@ -80,7 +80,12 @@ char *strcasestr(char *haystack, char *needle)
char *strstrwrapper(char *haystack, char *needle)
{
if (ISSET(USE_REGEXP)) {
int result=regexec(&search_regexp, haystack, 10, regmatches, 0);
if (!result)
return haystack+regmatches[0].rm_so;
return 0;
}
if (ISSET(CASE_SENSITIVE))
return strstr(haystack, needle);
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment