Click here to Skip to main content
15,887,027 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
User 1447141419-Sep-23 4:46
User 1447141419-Sep-23 4:46 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Richard MacCutchan19-Sep-23 5:30
mveRichard MacCutchan19-Sep-23 5:30 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
User 1447141420-Sep-23 2:17
User 1447141420-Sep-23 2:17 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Richard MacCutchan20-Sep-23 2:31
mveRichard MacCutchan20-Sep-23 2:31 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
RedDk21-Sep-23 7:17
RedDk21-Sep-23 7:17 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Richard MacCutchan21-Sep-23 23:07
mveRichard MacCutchan21-Sep-23 23:07 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
RedDk22-Sep-23 9:44
RedDk22-Sep-23 9:44 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
RedDk19-Sep-23 8:17
RedDk19-Sep-23 8:17 
Ok, (didn't read the doc link but thanks for that). Using your new regex:
_[a-zA-Z]*\.[a-zA-Z]*|\.[a-zA-Z]

on the sample of your OP:
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 
5. Something_Else_Type_XY_Z_26.04.23_Comment => NULL 
6. Something_Else_Type_XY_dfd6869_3_21.12.22_website.com_ZU = _website.com

Which isn't quite what you wanted (because of that leading "_"). And as for RM's take on it, as-written (without any _[a-zA-Z]*\.) THAT string returns no matches here either (I use a tool called RegexBuddy and after yesterday's experience, with MySql selected as the input language not std::regex).

So although I can confirm today's discovery is close it'll take me some more sleuthing to run down that leading character ascii 95 ...

{EDIT]
I'm seeing a warning when I try to tackle that underscore using "shorthand character classes" \w to the tune of "MySql doesn't support blah blah blah" so ... this could be a while.
[END EDIT]

modified 19-Sep-23 14:52pm.

GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Richard MacCutchan19-Sep-23 22:09
mveRichard MacCutchan19-Sep-23 22:09 
AnswerRe: MySQL Select query that chooses something dot something between certain underscores Pin
jschell14-Sep-23 10:55
jschell14-Sep-23 10:55 
QuestionExclude already masked data in regex Pin
NathanAsh25-Aug-23 11:14
NathanAsh25-Aug-23 11:14 
AnswerRe: Exclude already masked data in regex Pin
Terry R 202325-Aug-23 12:48
Terry R 202325-Aug-23 12:48 
GeneralRe: Exclude already masked data in regex Pin
NathanAsh28-Aug-23 5:32
NathanAsh28-Aug-23 5:32 
QuestionRegEx remove duplicate need help Pin
manoo885-Aug-23 13:04
manoo885-Aug-23 13:04 
GeneralRe: RegEx remove duplicate need help Pin
Member 106011917-Aug-23 12:04
professionalMember 106011917-Aug-23 12:04 
AnswerRe: RegEx remove duplicate need help Pin
Andre Oosthuizen7-Aug-23 23:27
mveAndre Oosthuizen7-Aug-23 23:27 
AnswerRe: RegEx remove duplicate need help Pin
jschell11-Aug-23 10:49
jschell11-Aug-23 10:49 
GeneralRe: RegEx remove duplicate need help Pin
trønderen11-Aug-23 12:21
trønderen11-Aug-23 12:21 
GeneralRe: RegEx remove duplicate need help Pin
jschell14-Aug-23 6:01
jschell14-Aug-23 6:01 
QuestionRegex search and replace? Tabs ... Pin
Member 1483514610-Jul-23 9:57
Member 1483514610-Jul-23 9:57 
AnswerRe: Regex search and replace? Tabs ... Pin
jschell14-Aug-23 6:13
jschell14-Aug-23 6:13 
GeneralHow to insert a space at the beginning of a line in a "for next" code loop (.NET regular expressions) Pin
Piotr Przeklasa4-Jul-23 2:20
Piotr Przeklasa4-Jul-23 2:20 
GeneralRe: How to insert a space at the beginning of a line in a "for next" code loop (.NET regular expressions) Pin
Andre Oosthuizen5-Jul-23 1:15
mveAndre Oosthuizen5-Jul-23 1:15 
GeneralRe: How to insert a space at the beginning of a line in a "for next" code loop (.NET regular expressions) Pin
Richard MacCutchan5-Jul-23 2:21
mveRichard MacCutchan5-Jul-23 2:21 
GeneralRe: How to insert a space at the beginning of a line in a "for next" code loop (.NET regular expressions) Pin
jschell5-Jul-23 5:31
jschell5-Jul-23 5:31 

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.