Using Regex with Brio (Hyperion Interactive Reporting)

230 views Asked by At

I am trying to use Regex with Brio interactive reporting I have a column in the results set called event. 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

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. 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

1

There are 1 answers

1
Stephan On BEST ANSWER

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"
}