Data Studio
2.2K members online now
2.2K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

REGEXP parsing fails

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

What is wrong with this? It fails to parse and the "error response" dimension is text that includes the text "5.1.1" in many records.

This is not the actual query I need, but if this won't parse I am stuck. Is there something with MacOS backslash characters?

 

REGEXP_EXTRACT(Error Response, '(\W|^)(5\.1\.1)(\W|$)')

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Gerry C
May 2017

REGEXP parsing fails

Google Employee
# 3
Google Employee

Hi Gerry

 

I checked with a developer and it appears there's a bug in the regex parser. If you double your escape characters, it should work:

 

REGEXP_EXTRACT(Error Response, '(\\W|^)(5\\.1\\.1)(\\W|$)')

 

Sorry for the inconvenience. We have a fix in the works.

 

Best regards,

 

Rick 

 

View solution in original post

REGEXP parsing fails

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

I've not used them in this context but I've found DS doesn't like backslash characters, so I'm not sure what you're supposed to do when testing for characters such as .

Marked as Best Answer.
Solution
Accepted by topic author Gerry C
May 2017

REGEXP parsing fails

Google Employee
# 3
Google Employee

Hi Gerry

 

I checked with a developer and it appears there's a bug in the regex parser. If you double your escape characters, it should work:

 

REGEXP_EXTRACT(Error Response, '(\\W|^)(5\\.1\\.1)(\\W|$)')

 

Sorry for the inconvenience. We have a fix in the works.

 

Best regards,

 

Rick