[pmwiki-users] regex in (:if how to use correctly

Patrick R. Michaud pmichaud at pobox.com
Thu Jan 23 13:53:25 CST 2014


On Thu, Jan 23, 2014 at 08:45:42PM +0100, lists at basel-inside.ch wrote:
> Good evening
> 
> I like to only include some pages in a pagelist, I have seen the
> possiblity of regexp as
> (:if match -Talk$:)  [PmWiki/ConditionalMarkup-Talk]
> 
> I'm not very familar with regexp and (:if constructions
> I made one test with (:if match [0-9]* :-) in the hope to selekt
> everything which beginns with numeric, but it seems to be
> uncorrect...

Everything that begins with numeric:

    (:if match ^\d :)
  or
    (:if match ^[0-9] :)

> Actually I like to select
> =>00001mmmm   (5 Numbers Product-Nr and n letters for variations/tests)

Everything that starts with five digits:

    (:if match ^\d{5} :)
  or
    (:if match ^[0-9]{5} :)

Pm



More information about the pmwiki-users mailing list