help-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pattern matches whole string only


From: Olivier Croquette
Subject: Re: Pattern matches whole string only
Date: Tue, 13 Mar 2007 15:53:21 +0100
User-agent: Internet Messaging Program (IMP) 3.2.5

Quoting Shigio YAMAGUCHI <address@hidden>:
> > When I search for a symbol using a regexp, the return values are the one
> > matching the WHOLE pattern, ie. "abc" won't match "XabcY", I have to sear=
> > ch for
> > ".*abc.*"
> >
> > Is there any way to have the pattern also matching substrings?
>
> You can use '.*abc' or 'abc.*' to do it.
> 'abc' means '^abc$'.

Yes, and that's a problem :/
It's far more common to search for a substring than for an exact match, and it's
annoying to have to complexify the search pattern all the time.
I am looking for a way for to do that without having to adapt the pattern.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]