public final class PunchGrokUtils extends Object
Modifier and Type | Method and Description |
---|---|
static int |
getIndexForSemantic(String semantic)
Punch uses grok semantic string like "punch00", "punch01" etc ..
|
static List<String> |
getRepeatedMatches(String input,
String regex)
Given an input string and a standard regex pattern, return the repeated
matches as a list of Strings.
|
public static final String SEMANTIC
public static int getIndexForSemantic(String semantic)
semantic
- the semantic name inside a named regex or a grok pattern.public static List<String> getRepeatedMatches(String input, String regex)
Beware : say you have [abc][def] as input. If you use the regex :
"\\[[a-z]\*\]"
you will get { "[abc]", "[def]" }, but with
"\\[([a-z]*)\\]"
you will get { "abc", "def" }
input
- the input Stringregex
- the regex to applyCopyright © 2022. All rights reserved.