[pmwiki-devel] Quick preg_replace question...

Hans design5 at softflow.co.uk
Fri Apr 27 11:19:06 CDT 2007


Friday, April 27, 2007, 5:11:56 PM, The wrote:

> '/(\n?)\[([trc][0-9]{0,1}\\b)(.*?)\]/e'

'/(\n?)\[([trc][0-9]?\\b)(.*?)\]/e'

? means "previous character once or not", so
[0-9]? means "single digit or none".
Just a bit shorter than {0,1}
(and I know you like it short!) :)


Hans




More information about the pmwiki-devel mailing list