# JDK 1.4.1 Regular Expressions

#Macros

macro.isbn.name=isbn
macro.link.name=link
macro.quote.name=quote
macro.mailto.name=mailto
macro.code.name=code
macro.apidocs.name=api-docs
macro.filepath.name=file-path
macro.api.name=api
macro.asin.name=asin
macro.interwiki.name=inter-wiki
macro.macrolist.name=list-of-macros
macro.rfc.name=rfc
macro.table.name=table
macro.xref.name=xref

macro.code.start=<div class=\"code\"><pre>
macro.code.end=</pre></div>

#Filters
#filter.bold.match=(^|>|[\\p{Punct}\\p{Space}]+)__(.*?)__([\\p{Punct}\\p{Space}]+|<|$)
#filter.bold.print=$1<b class=\"bold\">$2</b>$3

filter.bold.match=(?<!_)__(?!_)(.*?)(?<!_)__(?!_)
filter.bold.print=<b class=\"bold\">$1</b>

# Notice the checks to ensure ~~~ doesn't match but \~~~ does.
filter.italic.match=(?<!~)~~(?!~)(.*?)(?<!~)~~(?!~)
filter.italic.print=<i class=\"italic\">$1</i>

filter.superscript.match=(?<!\\^)\\^\\^(?!\\^)(.*?)(?<!\\^)\\^\\^(?!\\^)
filter.superscript.print=<sup class="superscript">$1</sup>

filter.subscript.match=(?<!%)%%(?!%)(.*?)(?<!%)%%(?!%)
filter.subscript.print=<sub class="subscript">$1</sub>

# HRule should be on  a line by itself(?)
#filter.line.match=^-----*$
filter.line.match=-----*
filter.line.print=<hr class=\"line\"/>

filter.newline.match=\\\\\\\\
filter.newline.print=<br/>

#filter.strikethrough.match=([^!-]|^)--(?=.*--)((?:(?:[^-]+)-?)+)--([^-]|$)
#filter.strikethrough.match=([^!-]|^)--((?:(?:[^-]+)-?)+)--([^-]|$)
#filter.strikethrough.print=$1<strike class=\"strike\">$2</strike>$3

# Should now obey the escape character
filter.strikethrough.match=(?<!-)--(?!-)(.*?)(?<!-)--(?!-)
filter.strikethrough.print=<strike class=\"strike\">$1</strike>

#filter.typography.match=([^.]|^)[.][.][.](?!\\.)( |$)
#filter.typography.print=$1&#8230;$2

# Similarly will obey the slash character.
filter.typography.match=(?<![.]|<)[.][.][.](?![.])
filter.typography.print=&#8230;

#filter.url.match=([^\"'=]|^)((http|ftp)s?://(%[\\p{Digit}A-Fa-f][\\p{Digit}A-Fa-f]|[-_.!~*';/?:@#&=+$,\\p{Alnum}])+)
filter.url.match=([^\"'=]|^)((http|ftp)s?://(%\\p{XDigit}\\p{XDigit}|[-_.!~*';/?:@#&=+$,\\p{Alnum}])+)
# Jakarta ORO Perl5(?) Syntax
#filter.url.match=([^\"'=]|^)((http|ftp)s?://(%[[:digit:]A-Fa-f][[:digit:]A-Fa-f]|[-_.!~*';/?:@#&=+$,[:alnum:]])+)
filter.url.print=<span class=\"nobr\">{0}<a href=\"{1}\" target="rwikiexternal">{2}</a></span>

filter.escape.match=\\\\(\\\\\\\\)|\\\\(.)|([&<>])|(\r\n?)

# ORO: filter.heading.match=^[[:space:]]*(1(\\.1)*)[[:space:]]+(.*?)$
# Original: filter.heading.match=^[\\p{Space}]*(1(\\.1)*)[\\p{Space}]+(.*?)$
filter.heading.match=^[\\p{Space}]*[hH](([123456]))\\.?[\\p{Space}]+(.*?)$
filter.heading.print=<h3 class=\"heading-h{0}\"><a name=\"{2}\" class=\"anchorpoint\"></a>{1}</h3>

filter.key.match=((Ctrl|Alt|Shift)-[^ ]*)
filter.key.print=<span class=\"key\">$1</span>

filter.mark.match=(^|[[:space:]]+)neotis([[:space:]]?|[.!,:]?|$)
filter.mark.print=<a href=\"http://neotis.de/\">neotis&#174;</a>

#filter.paragraph.match=([ \t\r]*[\n]){2}
#filter.paragraph.print.1=<p class=\"paragraph\" >
#filter.paragraph.print.2=</p><p class=\"paragraph\"/>

#filter.paragraph.match=(^[ \t\r]*[\n])(.*?)(^[ \t\r]*[\n])
#filter.paragraph.print=<p class=\"paragraph\">{1}</p>{2}

filter.paragraph.breaks.match=([ \t\r]*[\n]){2}
filter.paragraph.breaks.print=</p><p class=\"paragraph\">
filter.paragraph.first.print=<p class=\"paragraph\">
filter.paragraph.last.print=</p>
filter.paragraph.first.match=(\\p{Alnum}>)(.*?)$
filter.paragraph.last.match=.*?(</\\p{Alpha})

#filter.paragraph.match=([ \t\r]*[\n]){2}
#filter.paragraph.print.1=<p class=\"paragraph\" >
#filter.paragraph.print.2=</p><p class=\"paragraph\"/>



filter.linktest.match=\\[([^<>]*?)\\]

#filter.wikilink.match=([A-Z][a-z]+([A-Z][a-z]+)+)

#Stops wikilinks from being linked if they're inside [ ]'s 
filter.wikilink.match=(?<!\\[)([A-Z][a-z]+([A-Z][a-z]+)+)(?!\\])

filter.param.match=\\{\\$([^}]*)\\}

#filter.list.match=(^[\\p{Space}]*([-#*]+|[-#*]*[iIaA1ghHkKj]+\\.)[\\p{Space}]+([^\r\n]+)[\r\n]*)+
# from SAK-3783 
filter.list.match=(^([-#*]|([iIaAghHkKj]\\.))+[\\p{Blank}]+([^\r\n]+)\r?\n?\r??\n??)+
#filter.list.match=^[\\p{Space}]*([-#*]+[\\p{Space}]+|[-#*]?[iIaA1ghHkKj][-#*iIaA1ghHkKj]*\\.[\\p{Space}]+)(\r?\n[\\p{Space}]*(?:([-#*]+[\\p{Space}]+)|([-#*]?[iIaA1ghHkKj][-#*iIaA1ghHkKj]*\\.[\\p{Space}]+))|[^\\r\\n]+)*$
#filter.list.match=^[\\p{Space}]*([-#*]+[\\p{Space}]+|[iIaA1ghHkKj][iIaA1ghHkKj]*[.][\\p{Space}]+)(?:([-#*]+[\\p{Space}]+)|([iIaA1ghHkKj][iIaA1ghHkKj]*[.][\\p{Space}]+)|.+)*$


