[pmwiki-devel] Quick preg_replace question...
    Patrick R. Michaud 
    pmichaud at pobox.com
       
    Fri Apr 27 07:23:40 CDT 2007
    
    
  
On Fri, Apr 27, 2007 at 01:11:04PM +0100, Hans wrote:
> Friday, April 27, 2007, 11:47:02 AM, The wrote:
> 
> > I've just been developing an advanced tables markup system similar to
> > the one developed by JB, only with a syntax that makes a bit more
> > sense to me.
> 
> > '/\\n([ ]{0-2})\[([trc]{1})(.*?)\]/e'
> 
> It seems to me the pattern you seem to be aiming for is:
> "after a new line a line starting with either t or r or c or with one
> or two empty spaces before those letters"
Actually, it's aiming for any line that begins with zero or two
spaces, a square bracket, a t/r/c, and a close square bracket.
Thus it wouldn't match the lines you gave because they don't
contain a leading square bracket.
Pm
    
    
More information about the pmwiki-devel
mailing list