Could I get a regexp_substr pattern that is lookin...
# ask-stanley-ai
s
Could I get a regexp_substr pattern that is looking for the characters after 'GPS-' and before the second '-'
c
AI 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:
Copy code
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. ******
Slack 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
Please provide your feedback on this answer.