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 the Diffusion™ server . On the Diffusion server , 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 the Diffusion server :
  • 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 the Diffusion server are all based on the same style of regular expressions. The behavior of topic selectors on the clients and on the Diffusion server 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 the Diffusion server

Topic selectors evaluated on the Diffusion server 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 the Diffusion server .

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 the Diffusion server . 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 the Diffusion server . 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 the Diffusion server . 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 the Diffusion server . Ensure that you test the behavior of complex regular expressions that you use with the C client.