Hi all!
As I understand, Splunk doesn't have any special functions for normal work with string.
I need to get index of a not constant char/substring in another string.
Substring is not constant, it's value from another field.
Solution for constant substring: http://answers.splunk.com/answers/66496/how-to-get-index-of-a-particular-letter-in-string
But, it has not work for dynamic substring. I tried to form regular expression:
index="b2b_integration_oss"
| eval string="Some long string"
| eval regExString=".*(?<substring>\b" + searchField + "\b).*"
| rex field=string regExString
Then, I got next error:
Error in 'rex' command: The regex 'regExString' does not extract anything. It should specify at least one named group. Format: (?<name>...).
Why doesn't exist in Splunk any analogs for SQL CHARINDEX function?
Anyone can guide me please on this?
Thanks!
... View more