You probably also need the 'm' modifier at the end of the pattern. Otherwise the ^ will only match at the very start of the string, and not at the start of every line.
Even better might be to remove the ^'s altogether, unless you really want to make sure the markup directives will only be processed when at the beginning of a line. Pm On Wed, Nov 13, 2013 at 11:50:08PM +0000, Brian Tibbels wrote: > Many thanks Patrick - that sorts out when it should be done but I still > don't get the desired result. I amended the markup to escape all the quotes > and PSS the return strings, so it now stands at : > > Markup( "panel", > "fulltext", > "/^\\(:panel-default:\\)(.*?)^\\(:panelbody:\\)(.*?)^\\(:panelend:\\)/sie", > "Keep('<div class=\'panel panel-default\'> > <div class=\'panel-heading\'> > <h3 class=\'panel-title\'>'.PSS('$1').'</h3> > </div> > <div class=\'panel-body\'>'.PSS('$2').'</div> > </div>')" > ); > > > Rgds Brian > > > > *Brian Tibbels* > *IT support for small business and the individual* > http://clickmarlow.co.uk/ > *m*: 07804 109906* | t*: 01628 477640 > > > > On 13 November 2013 22:17, Patrick R. Michaud <pmich...@pobox.com> wrote: > > > By the time PmWiki reaches the "block" phase of Markup rules, the > > text has already been broken into individual lines. If you want to > > match a pattern against multiple lines of input, it needs to be > > in the "fulltext" phase, or at least "<split". > > > > Pm > > > > On Wed, Nov 13, 2013 at 09:39:48PM +0000, Brian Tibbels wrote: > > > I am trying to create a set of markups which will include Bootstrap > > > components - I thought I would start with an easy one and fell at the > > first > > > hurdle :(. I have looked at all the sample markups and some were obvious > > > and others were rather hard to follow as regular expressions are not my > > > strong point. Could someone please tell me what is wrong with this > > though... > > > > > > Markup( "panel", > > > "block", > > > > > "/^\\(:panel-default:\\)(.*?)^\\(:panelbody:\\)(.*?)^\\(:panelend:\\)/sie", > > > "<div class='panel panel-default'> > > > <div class='panel-heading'> > > > <h3 class='panel-title'>$1</h3> > > > </div> > > > <div class='panel-body'> > > > $2 > > > </div> > > > </div>" > > > ); > > > > > > > > > I was hoping to transform this sort of thing. > > > > > > (:panel-default:) > > > My Title > > > (:panelbody:) > > > Body text > > > (:panelend:) > > > > > > also if this could be transformed even better > > > > > > (:panel-default:) > > > My Table > > > (:panelbody:) > > > || class=table > > > || Col-1 || Col-2 || Col-3 || > > > (:panelend:) > > > > > > > > > ---- > > > Best wishes > > > Brian > > > > > _______________________________________________ > > > pmwiki-users mailing list > > > pmwiki-users@pmichaud.com > > > http://www.pmichaud.com/mailman/listinfo/pmwiki-users > > > > > > _______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users