7 kyu

SQL easy regex extraction

Description:

Input

You'll have a table like the following:

name greeting
Austin Gaylord Hola que tal #4702665
Kacie Zulauf Bienvenido 45454545 tal #470815 BD. WA470815

Output

In this practice you'll need to extract from the greeting column the number preceeded by the # symbol and place it in a new column named user_id.

name greeting user_id
Austin Gaylord Hola que tal #4702665 4702665
Kacie Zulauf Bienvenido 45454545 tal #470815 BD. WA470815 470815

NOTE: To keep it simple assume that the iser_id will be having varchar type

Regular Expressions
Fundamentals
Data Science

Stats:

CreatedDec 7, 2018
PublishedDec 7, 2018
Warriors Trained6522
Total Skips691
Total Code Submissions19000
Total Times Completed2821
SQL Completions2821
Total Stars93
% of votes with a positive feedback rating84% of 377
Total "Very Satisfied" Votes283
Total "Somewhat Satisfied" Votes66
Total "Not Satisfied" Votes28
Total Rank Assessments17
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • Javatlacati Avatar
  • FArekkusu Avatar
Ad