[pmwiki-devel] Quick preg_replace question...

Hans design5 at softflow.co.uk
Fri Apr 27 07:11:04 CDT 2007


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.

> Anyway I have it working beautifully, but need to know how to catch 0,
> 1, or 2 spaces in a pattern?  I tried...

> '/\\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"

This may catch quite normal paragraph text, like

 to all concerned

  right you are!

celery

Anyway, it may be good before launching another advanced table recipe
to discuss the markup, to see if it makes sense to others as well.


Hans




More information about the pmwiki-devel mailing list