[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pattern matches whole string only
From: |
Shigio YAMAGUCHI |
Subject: |
Re: Pattern matches whole string only |
Date: |
Tue, 13 Mar 2007 22:37:38 +0900 |
Hi,
> 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$'.
--
Shigio YAMAGUCHI <address@hidden> - Tama Communications Corporation
PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3