当前位置:网站首页>Splunk子查询模糊匹配csv中字段值为*
Splunk子查询模糊匹配csv中字段值为*
2022-07-07 05:19:00 【QYHuiiQ】
之前我们的案例中常用的是直接在spl中用*来模糊匹配,但是如果在一个csv中定义某个字段的值为*,然后在spl里对该csv进行查询时,这个*值是否还表示模糊匹配?针对这个疑问,做了如下测试:
- 创建csv测试数据
| makeresults
| eval student_name="T*",hometown="Zhejiang"
| fields - _time
| outputlookup student.csv
#这里我想表示的是名字以T开头的,所有学生的hometown都是Zhejiang查看csv:

- 使用spl将原数据与csv合并查询
| makeresults
| eval student_name="Tina",age="17",hometown="Zhejiang"
| search
[| inputlookup student.csv
| fields student_name hometown]
| table student_name age hometown这条数据中的学生名字是以开头的,如果csv中的T*可以表示模糊匹配的话,那么我们的执行结果应该是可以查询出来这条数据,如果csv中的T*表示字符串"T*",那么就查不出来结果。
执行结果:
Case1:

Case2:

说明csv中的T*表示模糊匹配。
Case3:

Case4:

通过上面的测试可以得出,csv中的字段值为*时,表示模糊匹配而不是字符串。
边栏推荐
- Minimum absolute difference of binary search tree (use medium order traversal as an ordered array)
- Network learning (I) -- basic model learning
- LeetCode简单题之判断一个数的数字计数是否等于数位的值
- opencv学习笔记五——梯度计算/边缘检测
- Complex network modeling (III)
- Infix keyword infix expression and the use of generic extension function in kotlin
- Qinglong panel -- Huahua reading
- Complete linear regression manually based on pytoch framework
- Niu Mei's mathematical problem --- combinatorial number
- [quick start of Digital IC Verification] 10. Verilog RTL design must know FIFO
猜你喜欢

利用 Helm 在各类 Kubernetes 中安装 Rainbond

Vulnerability recurrence easy_ tornado

轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷

数据库实时同步利器——CDC(变化数据捕获技术)

uniapp 移动端强制更新功能

Complex network modeling (I)
![[quick start of Digital IC Verification] 13. SystemVerilog interface and program learning](/img/d8/ffc1b7527f0269cecb2946ab402a2e.png)
[quick start of Digital IC Verification] 13. SystemVerilog interface and program learning

发挥创客教育空间的广泛实用性

Uniapp mobile terminal forced update function

Avatary的LiveDriver试用体验
随机推荐
ZCMU--1492: Problem D(C语言)
Introduction à l'objet blob
[step on the pit series] H5 cross domain problem of uniapp
The legend about reading the configuration file under SRC
发挥创客教育空间的广泛实用性
Understanding of out covariance, in inversion and invariance in kotlin
Vulnerability recurrence easy_ tornado
贝叶斯定律
漏洞複現-Fastjson 反序列化
太真实了,原来自己一直没有富裕起来是有原因的
Function extension, attribute extension and non empty type extension in kotlin
DNS server configuration
Interview questions (CAS)
海信电视开启开发者模式
[quick start of Digital IC Verification] 12. Introduction to SystemVerilog testbench (svtb)
Lattice coloring - matrix fast power optimized shape pressure DP
Unityhub cracking & unity cracking
【踩坑系列】uniapp之h5 跨域的问题
Find the mode in the binary search tree (use medium order traversal as an ordered array)
Excel import function of jeesite form page