- To: Peter Rundle <peter@xxxxxxxxxxxxxxxxxx>
- Subject: Re: [SLUG] Perl Regular expression help
- From: Nick Andrew <nick@xxxxxxxxxxxxxxx>
- Date: Wed, 14 Jul 2010 18:06:14 +1000
- Cc: slug <slug@xxxxxxxxxxx>
- User-agent: Mutt/1.5.18 (2008-05-17)
On Wed, Jul 14, 2010 at 01:27:13PM +1000, Peter Rundle wrote:
> I don't really understand how the [^&] followed by the * works but it does.
"any character which is not an ampersand" repeated zero or more times.
So it matches
()
()&
(a)
(a)&
(aaa...)
(aaa...)&
Where the stuff inside () is what's being matched. The matched part stops
at the first & or the end of the string. It's greedy so it matches as long
a string as possible.
Nick.