error timestamp regex in bigquery (what mistake I am doing here)

DECLARE
TIMESTAMP_REGEX STRING DEFAULT r'^\d{4}-\d{1,2}-\d{1,2}[T]\d{1,2}:\d{1,2}:\d{1,2}(.\d{1,6})? *(([+-]\d{1,2}(:\d{1,2})?)|Z|UTC)?$'

DECLARE
DATE_REGEX STRING DEFAULT
r'^\d{4}-(?:[1-9]|0[1-9]|1[012])-(?:[1-9]|0[1-9]|[12][0-9]|3[01])$'

DECLARE
TIME_REGEX STRING DEFAULT r'^\d{1,2}:\d{1,2}:\d{1,2}(.\d{1,6})?$'

Can you please clarify how is this related to R or RStudio?

I would really encourage you to review the following guide, FAQ: Tips for writing R-related questions.
For example, the guide emphasizes asking coding questions with formatted code-chunks and a reprex.

in R the string literals are not of the form r'something' rather they are r'(something)' therefore I would try

r'(^\d{4}-(?:[1-9]|0[1-9]|1[012])-(?:[1-9]|0[1-9]|[12][0-9]|3[01])$)'
1 Like

I am doing a project involving both bigquery and RStudio. so needed help. I am novice to query language and Rstudio. Please understand. I am sorry for posting a bigquery doubt :frowning:

hey it worked. thank you so much

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.