0

I need to extract the app_id from the following string in the column below:

&app_id=4.25.9&

so anything that starts with &app_id= and ends with &

Any ideas on how to write this example? The number of characters and symbols may differ.

2
  • like '&app_id%' and like '%&' Commented Jul 6, 2018 at 10:10
  • It looks like answer by @Sadiq should solve your issue. If that's the case accept it please. Commented Jul 9, 2018 at 8:12

1 Answer 1

4

This should be sufficient:

REGEXP_EXTRACT(your_column, r'\&app_id=(.+?)\&')

The app id matching right now .+? is a little broad and will match any character, you may want to restrict it further.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.