diff --git a/re.c b/re.c index cf369a9..18646e4 100644 --- a/re.c +++ b/re.c @@ -278,7 +278,7 @@ research(Regexp *rp, char *str, int start, * starts in the middle of a string, so don't bother trying it * in that case. */ - if (rp->dfareg != NULL && ! no_bol && start == 0) { + if (rp->dfareg != NULL && ! no_bol && ! need_start) { struct dfa *superset = dfasuperset(rp->dfareg); if (superset) ret = dfaexec(superset, str+start, str+start+len,