Skip to content

Commit 830b8b3

Browse files
committed
rex-07march
0 parents  commit 830b8b3

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

regex basics.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# 07th march 2018 inventsekar
2+
3+
# docs.splunk link
4+
# http://docs.splunk.com/Documentation/Splunk/7.0.2/SearchReference/Regex

rex basics.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# 07th march 2018 inventsekar
2+
3+
# docs.splunk link
4+
# http://docs.splunk.com/Documentation/Splunk/7.0.2/SearchReference/Rex

rex-vs-regex.txt

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 07th march 2018 inventsekar
2+
# to understand the basic differences between rex and regex
3+
4+
5+
6+
rex - Description
7+
Use this command to either extract fields using regular expression named groups, or replace or substitute characters in a field using sed expressions.
8+
9+
The rex command matches the value of the specified field against the unanchored regular expression and extracts the named groups into fields of the corresponding names. If a field is not specified, the regular expression is applied to the _raw field. Note: Running rex against the _raw field might have a performance impact.
10+
11+
When mode=sed, the given sed expression used to replace or substitute characters is applied to the value of the chosen field. If a field is not specified, the sed expression is applied to _raw. This sed-syntax is also used to mask sensitive data at index-time. Read about using sed to anonymize data in the Getting Data In Manual.
12+
13+
Use the rex command for search-time field extraction or string replacement and character substitution.
14+
15+
16+
regex - Description
17+
The regex command removes results that do not match the specified regular expression.
18+
19+
#-------------------------------------------------------
20+
# Normally you would use "rex".
21+
# regex is, generally less-required than rex.
22+
23+
# so, as a beginner, if you are got confusion of which one to use "rex or regex", normally you would required to use "rex".
24+
#-------------------------------------------------------

0 commit comments

Comments
 (0)