Why don't my regular expressions work?

Purpose

Why don't my regular expressions work?

Answer

The regular expression language used is that which is built into Java 2.

However, due to the way the Confluence macro rendering engine works, some modifications have had to be made.

Consult the following table:

Original

Function

Problem

Substitute

Original

Function

Problem

Substitute

Original

Function

Problem

Substitute

|

Boolean OR

Interpreted by Confluence as 'next parameter'.

,

,

Comma

Because it is substituting for the pipe, it can't be listed directly.

x2C

\

Escape marker

Has to be double-escaped.

 

{

Macro start marker

Has to be escaped.

x7B

}

Macro end marker

Has to be escaped.

x7D

 

 TIPS: Use (?s) for dotall mode. In dotall mode, the expression matches any character, including a line terminator. It is useful when filtering content that includes line breaks.Â