简体   繁体   English

将正则表达式与Brio一起使用(Hyperion交互式报告)

[英]Using Regex with Brio (Hyperion Interactive Reporting)

I am trying to use Regex with Brio interactive reporting I have a column in the results set called event. 我正在尝试将正则表达式与Brio交互式报告一起使用,我在结果集中有一列称为事件。 There is a compliance guide how this event should be inputted. 有一个合规性指南应如何输入此事件。 The aim of the report is to find out who isnt doing it correctly and correct them 该报告的目的是找出谁做得不正确并纠正他们

An example of what should be there is 05/0035 应该存在的示例是05/0035

I have created the script below which should output compliant if 05/0035 However Brio doesnt like it and gives me an syntax error message. 我创建了下面的脚本,如果05/0035,该脚本应该输出兼容。但是Brio不喜欢它,并给了我一个语法错误消息。 Has anyone used it correctly before? 有人正确使用过吗?

strSearch = Event;
regx = ^[0-9]{2}/[0-9]{4}
if (regx.test( strSearch )) {
"COMPLIANT"
}

Can anyone see the problem 谁能看到问题

Thanks 谢谢

You should close your statements and enclose the regex with two / , like below: 您应该关闭语句,并用两个/括起来正则表达式,如下所示:

strSearch = Event;
regx = /^[0-9]{2}/[0-9]{4}/;
if (regx.test( strSearch )) {
"COMPLIANT"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM