Shelby Owens
10/01/2024, 12:52 PMCeligo AI
10/01/2024, 12:53 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems like you're looking for a way to use REGEXP_SUBSTR to extract a specific pattern from a string. In your case, you want to extract the characters after 'GPS-' and before the second '-'. Here's a possible solution using REGEXP_SUBSTR:
SQL
REGEXP_SUBSTR(your_column, 'GPS-([^\\-]*)-', 1, 1, 'i', 1)
This pattern will match any string that starts with 'GPS-', followed by any number of characters that are not a '-', and ends with a '-'. The 'i' flag makes the match case-insensitive, and the final '1' indicates that we want the first group of parentheses in the pattern.
Please replace your_column
with the actual column name you're working with.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
10/01/2024, 12:53 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.817123
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813482523
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.806643724
Celigo AI
10/01/2024, 12:53 PM