Just a second...

Regular expressions

Depending on what the topic selector is used for, regular expressions in topic selectors can be evaluated on the client or on Diffusion™ Cloud. On Diffusion Cloud, regular expressions are evaluated as Java™-style regular expressions. On clients, regular expressions are evaluated according to the conventions of the client library.

The following client uses of topic selectors are evaluated on Diffusion Cloud:
  • Subscribing to topics
  • Unsubscribing from topics
  • Subscribing another client to topics
  • Unsubscribing another client from topics
  • Fetching topic states
  • Removing topics
The following client uses of topic selectors are evaluated on the client:
  • Creating a stream to receive updates published to topics
  • Creating a stream to receive messages sent on message paths

The regular expression evaluation on each of the client libraries and on Diffusion Cloud are all based on the same style of regular expressions. The behavior of topic selectors on the clients and on Diffusion Cloud is the same for all standard uses of regular expressions. More advanced or complex regular expressions might differ slightly in behavior.

See the following sections for platform-specific information.

On Diffusion Cloud

Topic selectors evaluated on Diffusion Cloud are evaluated as Java-style regular expressions and are based on java.util.regex.Pattern.

For more information about Java-style regular expressions, see Java regular expressions.

On Java and Android™ clients

Topic selectors evaluated on these clients are evaluated as Java-style regular expressions. There are no differences between how a regular expression is evaluated on these clients and how it is evaluated on Diffusion Cloud.

For more information about Java-style regular expressions, see Java regular expressions.

On .NET clients

Topic selectors evaluated on the .NET client are evaluated as .NET Framework regular expressions, these are compatible with Perl 5 regular expressions. For more information about .NET regular expressions, see https://msdn.microsoft.com/en-us/library/az24scfc(v=vs.110).aspx.

The .NET evaluation of regular expressions can differ from the Java evaluation of the same regular expression on Diffusion Cloud. For examples of how these can differ, see http://stackoverflow.com/a/545348.

Ensure that you test the behavior of complex regular expressions that you use with the .NET client.

On Apple® clients

Topic selectors evaluated on the Apple client are evaluated according to the NSRegularExpression class, which uses ICU regular expression syntax. For more information about Apple regular expressions, see: .

The Apple evaluation of regular expressions can differ from the Java evaluation of the same regular expression on Diffusion Cloud. Ensure that you test the behavior of complex regular expressions that you use with the Apple client.

On JavaScript® clients

Topic selectors evaluated on the JavaScript client are based on the ECMAScript standard. For more information about JavaScript regular expressions, see:

The JavaScript evaluation of regular expressions can differ from the Java evaluation of the same regular expression on Diffusion Cloud. Ensure that you test the behavior of complex regular expressions that you use with the JavaScript client.

On C clients

Topic selectors evaluated on the C client use PCRE. For more information about C regular expressions, see http://www.pcre.org/.

The C evaluation of regular expressions can differ from the Java evaluation of the same regular expression on Diffusion Cloud. Ensure that you test the behavior of complex regular expressions that you use with the C client.