I have a table of URLs with data looking as shown below. The number (Steam AppId) following /app/
is what I'd like to insert into another table's INT
column. Sometimes the data may be followed by an ending slash or more text that I don't need.
https://store.steampowered.com/app/123
https://store.steampowered.com/app/1234/
https://store.steampowered.com/app/1234567800/some_game_title/
https://store.steampowered.com/app/999https://baddata.com
This regex group 1 would isolate the number I need:
.*\/app\/(\d*)
However I don't know how to apply this to an SQL query. I'm using an Azure database to be clear.
The expected results would be
123
1234
1234567800
999
edit: added another url example for undesired characters following the AppId