in reply to Re: matching problem
in thread matching problem
Actually, I missed the definition of sub MatchLAC in the OP; my reply was directed solely at Re^2: matching problem. Mea culpa.
++AnomalousMonk for the excellent exposition! I didn’t know that the empty regex acts as a stand-in for the regex most recently matched (whether the match was successful or not). Is this documented anywhere? I’ve been looking through perlre, etc., but the only mention of the empty regex I’ve found so far relates to its use with split, where it means “split the string into individual characters.”
I guess overloading it makes sense, as a match that always succeeds isn’t much use. Are there any typical use cases for employing the empty regex to mean “repeat the regex used in the previous match”?
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: matching problem
by AnomalousMonk (Archbishop) on Feb 26, 2013 at 20:49 UTC |