当前位置:网站首页>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中的字段值为*时,表示模糊匹配而不是字符串。
边栏推荐
- Recursive construction of maximum binary tree
- 提高企业产品交付效率系列(1)—— 企业应用一键安装和升级
- LeetCode简单题之字符串中最大的 3 位相同数字
- CCTV is so warm-hearted that it teaches you to write HR's favorite resume hand in hand
- Zcmu--1396: queue problem (2)
- It's too true. There's a reason why I haven't been rich
- Rainbond 5.6 版本发布,增加多种安装方式,优化拓扑图操作体验
- Leetcode medium question my schedule I
- 在Rainbond中一键部署高可用 EMQX 集群
- Qinglong panel -- finishing usable scripts
猜你喜欢
Game attack and defense world reverse
Excel import function of jeesite form page
Empire CMS collection Empire template program general
快解析内网穿透助力外贸管理行业应对多种挑战
The largest 3 same digits in the string of leetcode simple question
漏洞复现-easy_tornado
Battery and motor technology have received great attention, but electric control technology is rarely mentioned?
通俗易懂单点登录SSO
Hisense TV starts the developer mode
Vulnerability recurrence fastjson deserialization
随机推荐
opencv学习笔记四——膨胀/腐蚀/开运算/闭运算
CCTV is so warm-hearted that it teaches you to write HR's favorite resume hand in hand
数据库实时同步利器——CDC(变化数据捕获技术)
Leetcode medium question my schedule I
Pytoch (VI) -- model tuning tricks
Make LIVELINK's initial pose consistent with that of the mobile capture actor
Example of file segmentation
Complex network modeling (III)
Find the mode in the binary search tree (use medium order traversal as an ordered array)
Leetcode 187 Repeated DNA sequence (2022.07.06)
eBPF Cilium实战(2) - 底层网络可观测性
eBPF Cilium实战(1) - 基于团队的网络隔离
互动送书-《Oracle DBA工作笔记》签名版
饥荒云服管理脚本
海信电视开启开发者模式
Call pytorch API to complete linear regression
LeetCode简单题之判断一个数的数字计数是否等于数位的值
game攻防世界逆向
Qinglong panel - today's headlines
Avatary的LiveDriver试用体验