Re: Pattern matches whole string only
Olivier Croquette <[email protected]>
| Newsgroups | gmane.comp.gnu.global.general |
|---|---|
| Message-ID | <[email protected]> |
Quoting Shigio YAMAGUCHI <[email protected]>: > > 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.