Click here to Skip to main content
15,794,629 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
Questionlearning regex isn't easy :-) Pin
Kardock18-Sep-23 5:22
Kardock18-Sep-23 5:22 
AnswerRe: learning regex isn't easy :-) Pin
Richard Deeming18-Sep-23 6:02
mveRichard Deeming18-Sep-23 6:02 
AnswerRe: learning regex isn't easy :-) Pin
k505418-Sep-23 6:33
mvek505418-Sep-23 6:33 
AnswerRe: learning regex isn't easy :-) Pin
jschell18-Sep-23 6:42
jschell18-Sep-23 6:42 
GeneralRe: learning regex isn't easy :-) Pin
Kardock18-Sep-23 7:07
Kardock18-Sep-23 7:07 
AnswerRe: learning regex isn't easy :-) Pin
trønderen18-Sep-23 7:04
trønderen18-Sep-23 7:04 
AnswerRe: learning regex isn't easy :-) Pin
jschell19-Sep-23 6:29
jschell19-Sep-23 6:29 
QuestionMySQL Select query that chooses something dot something between certain underscores Pin
Member 1450438414-Sep-23 7:12
Member 1450438414-Sep-23 7:12 
I have a MySQL column with underscores and between those underscores a domain name (which is anything with a dot, except number.number), and I like to use REGEXP_SUBSTR to extract that domain, but only if there are at least 2 preceding underscores before it.

Examples:

1. Something_Else_Type_XY_Z_26.04.23_website.com => website.com
2. Something_Else_Type_XY_Z_website.com_26.04.23 => website.com
3. Something_Else_Type_XY_Z_26.04.23_website.com_Comment => website.com
4. Something_website.com_Else_Type_XY_Z_26.04.23_Comment => NULL (due to not having 2 preceding underscores first)
5. Something_Else_Type_XY_Z_26.04.23_Comment => NULL (due to not having something dot something that isn't number.number)
6. Something_Else_Type_XY_dfd6869_3_21.12.22_website.com_ZU => website.com

Which regex could do so instead of ... in SELECT REGEXP_SUBSTR(full_name, ...) as domain_name?
AnswerRe: MySQL Select query that chooses something dot something between certain underscores Pin
RedDk14-Sep-23 7:36
RedDk14-Sep-23 7:36 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Member 1450438418-Sep-23 5:28
Member 1450438418-Sep-23 5:28 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
RedDk18-Sep-23 8:23
RedDk18-Sep-23 8:23 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Member 1450438419-Sep-23 0:16
Member 1450438419-Sep-23 0:16 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Richard MacCutchan19-Sep-23 2:45
mveRichard MacCutchan19-Sep-23 2:45 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Member 1450438419-Sep-23 5:46
Member 1450438419-Sep-23 5:46 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Richard MacCutchan19-Sep-23 6:30
mveRichard MacCutchan19-Sep-23 6:30 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Member 1450438420-Sep-23 3:17
Member 1450438420-Sep-23 3:17 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Richard MacCutchan20-Sep-23 3:31
mveRichard MacCutchan20-Sep-23 3:31 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
RedDk21-Sep-23 8:17
RedDk21-Sep-23 8:17 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Richard MacCutchan22-Sep-23 0:07
mveRichard MacCutchan22-Sep-23 0:07 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
RedDk22-Sep-23 10:44
RedDk22-Sep-23 10:44 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
RedDk19-Sep-23 9:17
RedDk19-Sep-23 9:17 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Richard MacCutchan19-Sep-23 23:09
mveRichard MacCutchan19-Sep-23 23:09 
AnswerRe: MySQL Select query that chooses something dot something between certain underscores Pin
jschell14-Sep-23 11:55
jschell14-Sep-23 11:55 
QuestionExclude already masked data in regex Pin
NathanAsh25-Aug-23 12:14
NathanAsh25-Aug-23 12:14 
AnswerRe: Exclude already masked data in regex Pin
Terry R 202325-Aug-23 13:48
Terry R 202325-Aug-23 13:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.