$foo='abchelloxyz'; ($bar=$foo)=~s/abc(\w+)xyz/\1/; [download]
In reply to Re: Re: (wil) Re: regex: extract a substring by insensate in thread regex: extract a substring by Galen