문제

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

도움이 되었습니까?

해결책

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 ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top