Skip to end of banner
Go to start of banner

Why don't my regular expressions work?

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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

|

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

(lightbulb) 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. 

  • No labels