[
https://issues.apache.org/jira/browse/ARTEMIS-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16491838#comment-16491838
]
ASF GitHub Bot commented on ARTEMIS-1890:
-----------------------------------------
Github user jostbg commented on the issue:
https://github.com/apache/activemq-artemis/pull/2113
@michaelandrepearce The documentation states that a # matches zero or more
words. It doesn't say anything about different behavior of # depending on its
location in the expression. The current implementation however does not behave
according the documentation, so either the documentation is wrong or the
implementation has a bug. I argue that it is a bug and I doubt any user
actually expects that # in the middle of an expression behaves like a
one-or-more-words wildcard. Esp. after reading the docs. This is a very
surprising behavior.
While I agree that having regular expressions would be nice. It should be
an optional matching style as this can impact performance.
> # any-word wildcard doesn't match zero words if not used at the end of a
> wildcard expression
> --------------------------------------------------------------------------------------------
>
> Key: ARTEMIS-1890
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1890
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.6.0
> Reporter: Johan Stenberg
> Priority: Major
> Attachments: Artemis1890_AnyWordWildCard_Test.java
>
>
> [https://activemq.apache.org/artemis/docs/latest/wildcard-syntax.html] states
> that the {{#}} wildcard character means _"match any sequence of *zero* or
> more words"_. This however is only true if the wild card is the last
> character in a wildcard expression. If any word comes after the wildcard
> character then the actual behavior is _"match any sequence of *one* or more
> words"_
> This means, the pattern {{topics.#.FOO}} matches {{topics.abc.FOO}} but not
> {{topics.FOO}}
> I am attaching a test case.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)