[Pmwiki-users] multiline markup

pmwikiuser@estrider.com pmwikiuser
Fri Jan 7 11:10:49 CST 2005


I\'m trying to create a markup that will handle multiple lines (strings
with newline characters),  but I\'ve been running into problems with
regex matching.  My problem is that (.*?) will not match \\n and the
ways I know to get around it don\'t seem to work in the context of a
Markup() statement. For example I\'ve tried the regex
"/abcd(.*?)efg/sme" and "/abcd(?sme)(.*?)efg/" but neither seem to work
when $1 contains a newline (\\n).

Any suggestions on how to make:

(:BOB:) some
multi line
text
(:BOBEND:)

become 
<span id=\'BOB\'>some
multi line
text
</span>

I guess additionally I\'d need to use // to make the newlines display,
but the matching is the problem I\'m haveing. Any help?

Thanks,

Chris





More information about the pmwiki-users mailing list