[dokuwiki] Re: Search pattern challenge for plugin

  • From: "Martin Tschofen" <martin.tschofen@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 26 Dec 2006 19:02:49 -0600

So obvious, that does the trick. Thanks a lot for pointing this out.
Got another one if the pattern is preceeded by a [[reveal wide
10%|[[link]]/] DW thinks it's a link and gobbles it all up. I tried a
negative lookbehind: (?>!\[) before the pattern, but DW still thinks it's a
link. Tried various sorts without success.

Thanks...martin

On 12/26/06, Chris Smith <chris@xxxxxxxxxxxxx> wrote:

Martin Tschofen wrote:
> I'm trying to use the following syntax:
> [reveal className width%|wikitext/]
> e.g. [reveal wide 10%|[[link]]/]
>
> I'm struggling with the regex pattern for this. As soon as I throw in
the
> wiki link, the following pattern doesn't work anymore. I'm setting
> getSort
> to 154. I also tried 1154 as well as 4.
>
> \[reveal[^\r\n\|/\]]*+\|(?=[^\r\n\]/]*/\])
>
> this is I think: find [reveal followed at least by something but not
> returns
> | / ] followed by | then look ahead for any characters except returns ]
/
> followed by /]
>
> getType = formatting,
> getAllowedTypes = substition, protected, disabled, formatting
>
> Can I not do this because of the link syntax?
>
> Any help would be greatly appreciated.
>
In your regex you don't allow "]" and then you are using  [[link]] !

Remove the \] from your look ahead.

Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: