[
https://issues.apache.org/jira/browse/METRON-1431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16344051#comment-16344051
]
ASF GitHub Bot commented on METRON-1431:
----------------------------------------
Github user 1havran commented on a diff in the pull request:
https://github.com/apache/metron/pull/912#discussion_r164570355
--- Diff:
metron-stellar/stellar-common/src/test/java/org/apache/metron/stellar/dsl/functions/RegExFunctionsTest.java
---
@@ -68,4 +68,19 @@ public void testRegExGroupVal() throws Exception {
Assert.assertTrue("Did not fail on wrong number of
parameters",false);
}
}
+
+ @Test
+ public void testRegExReplace() throws Exception {
+ final Map<String, String> variableMap = new HashMap<String, String>()
{{
+ put("numbers", "12345");
+ put("numberPattern", "\\d(\\d)(\\d).*");
+ put("letters", "abcde");
+ put("empty", "");
+ }};
+
--- End diff --
Indeed, more tests included.
> Add REGEXP_REPLACE function to Stellar
> --------------------------------------
>
> Key: METRON-1431
> URL: https://issues.apache.org/jira/browse/METRON-1431
> Project: Metron
> Issue Type: Improvement
> Reporter: 1havran
> Priority: Minor
>
> Add REGEXP_REPLACE(input, pattern, value) function to Stellar that will
> replaceĀ all occurrences of regex pattern within the input by provided value.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)