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:09:00 UTC

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

     [ https://issues.apache.org/jira/browse/METRON-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Kupstaitis-Dunkler updated METRON-2002:
----------------------------------------------
    Description: 
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.

  was:
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.


> 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
>            Priority: Minor
>
> 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)