我尝试查找有关 Qlik Sense 和 RegEx 的任何信息。目标是字符串数据加载脚本中的 RegEx。
我知道 VBA Macros 在 QlikView 中是可能的。但它不适合 Qlik Sense。对 Qlik Sense 的扩展或 Mushups 不感兴趣。
是否可以在 Qlik Sense 中使用 RegEx?也许有人知道如何调用 JavaScript 函数?
BR,阿列克谢·雷日科夫
是的,看来你可以。
我找到了这个页面。我不确定这些正则表达式有多先进,但它说它是“高性能的”。您必须测试它是否支持“正则表达式”以外的任何内容。
QVSource 版本 1.5.2.7 和更高版本中的文本分析和情绪分析连接器包含一个新的 RegEx 选项,允许您从 QlikView 和 Qlik Sense 加载脚本运行高性能 RegEx 查找和替换操作。
它给出了以下代码示例:
Tickets:
load
* from
QVDs\ZenDesk_Tickets.qvd (qvd);
Params:
load
'RegEx' as api,
'((http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)' as regEx,
ZenDesk_Ticket_id as rowKey,
ZenDesk_Ticket_description as text
resident Tickets;
store Params into params.txt (txt);
TextAnalyserV2_SimpleFind:
LOAD
rowKey as ZenDesk_Ticket_id,
Match as SimpleFind_Match,
Index as SimpleFind_Index,
Length as SimpleFind_Length
FROM
[http://localhost:5555/QVSource/TextAnalyserV2/?table=SimpleMatch&appID=&processParamsSync=PATH_TO_QVW_FILE_HERE\params.txt]
(qvx);