Kusto 不支持正则表达式环视吗?
Does Kusto not support regex lookarounds?
Kusto 似乎不支持正则表达式环视,因为当我尝试 运行 以下命令时出现以下错误。我使用了错误的语法吗?如果真的不支持这个功能,我可以在哪里反馈投票给这个功能?
正面前瞻测试:
print(extract("t(?=t)", 0, "http"))
Expected Output: tt
Actual Error: Relop semantic error: 'extract()' has the following semantic error: SEM0420: Regex pattern is ill-formed: t(?=t).
负先行测试:
print(extract("t(?!t)", 0, "http"))
Expected Output: tp
Actual Error: Relop semantic error: 'extract()' has the following semantic error: SEM0420: Regex pattern is ill-formed: t(?!t).
Kusto 使用 re2
库:https://github.com/google/re2/wiki/Syntax, as mentioned here: https://docs.microsoft.com/en-us/azure/kusto/query/re2
该库不支持您要实现的目标 - 请参阅 https://github.com/google/re2/wiki/WhyRE2:
As a matter of principle, RE2 does not support constructs for which only backtracking solutions are known to exist. Thus, backreferences and look-around assertions are not supported.
关于您的其他问题,功能请求可以是 submitted/upvoted @ https://aka.ms/adx.uservoice
Kusto 似乎不支持正则表达式环视,因为当我尝试 运行 以下命令时出现以下错误。我使用了错误的语法吗?如果真的不支持这个功能,我可以在哪里反馈投票给这个功能?
正面前瞻测试:
print(extract("t(?=t)", 0, "http"))
Expected Output:
tt
Actual Error:
Relop semantic error: 'extract()' has the following semantic error: SEM0420: Regex pattern is ill-formed: t(?=t).
负先行测试:
print(extract("t(?!t)", 0, "http"))
Expected Output:
tp
Actual Error:
Relop semantic error: 'extract()' has the following semantic error: SEM0420: Regex pattern is ill-formed: t(?!t).
Kusto 使用 re2
库:https://github.com/google/re2/wiki/Syntax, as mentioned here: https://docs.microsoft.com/en-us/azure/kusto/query/re2
该库不支持您要实现的目标 - 请参阅 https://github.com/google/re2/wiki/WhyRE2:
As a matter of principle, RE2 does not support constructs for which only backtracking solutions are known to exist. Thus, backreferences and look-around assertions are not supported.
关于您的其他问题,功能请求可以是 submitted/upvoted @ https://aka.ms/adx.uservoice