You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "Stefan Kupstaitis-Dunkler (JIRA)" <ji...@apache.org> on 2019/02/13 13:07:00 UTC

[jira] [Created] (METRON-2002) Number of escape backslashes in REGEXP_MATCH Stellar function is inconsistent

Stefan Kupstaitis-Dunkler created METRON-2002:
-------------------------------------------------

             Summary: Number of escape backslashes in REGEXP_MATCH Stellar function is inconsistent
                 Key: METRON-2002
                 URL: https://issues.apache.org/jira/browse/METRON-2002
             Project: Metron
          Issue Type: Bug
            Reporter: Stefan Kupstaitis-Dunkler


When I want to escape a character in REGEXP_MATCH I need to escape it with 2 backslashes in the Stellar command line and 4 backslashes when you actually deploy it via the Metron config. Ideally it should be only one backslash in both cases, but a consistent behaviour as a starting point and a mention in the docs to escape the escape characters would be sufficient.

Simple example:
 * ip_address := '10.10.10.10'`
 * This matches on Stellar command line interface: `REGEXP_MATCH(ip_address, 10\\.10
.10
 .10)`
 * This works when configured for a running topology: `REGEXP_MATCH(ip_address, 10\\\\.10\\\\.10\\\\.10)`
 * Any other amount of slashes in both cases produces an error or no match.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)