Click here to Skip to main content
15,907,497 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
AnswerRe: learning regex isn't easy :-) Pin
jschell18-Sep-23 5:42
jschell18-Sep-23 5:42 
GeneralRe: learning regex isn't easy :-) Pin
Kardock18-Sep-23 6:07
Kardock18-Sep-23 6:07 
AnswerRe: learning regex isn't easy :-) Pin
trønderen18-Sep-23 6:04
trønderen18-Sep-23 6:04 
AnswerRe: learning regex isn't easy :-) Pin
jschell19-Sep-23 5:29
jschell19-Sep-23 5:29 
QuestionMySQL Select query that chooses something dot something between certain underscores Pin
User 1447141414-Sep-23 6:12
User 1447141414-Sep-23 6:12 
AnswerRe: MySQL Select query that chooses something dot something between certain underscores Pin
RedDk14-Sep-23 6:36
RedDk14-Sep-23 6:36 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
User 1447141418-Sep-23 4:28
User 1447141418-Sep-23 4:28 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
RedDk18-Sep-23 7:23
RedDk18-Sep-23 7:23 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
User 1447141418-Sep-23 23:16
User 1447141418-Sep-23 23:16 
GeneralRe: MySQL Select query that chooses something dot something between certain underscores Pin
Richard MacCutchan19-Sep-23 1:45
mveRichard MacCutchan19-Sep-23 1:45 
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 
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 
If I were to use Notepad++ then the find regex would be:
([x\-*]\d{1,4})?(\d{3,8})


So it ties the 1-4 numbers immediately following a x (or X as Notepad++ normally case insensitive), a - (this is a meta character so needs the escape char to make it a normal char) or a *. Having them in a group with a ? allows for non capture if the line doesn't start with the x, - or *. The second group captures between 3 and 8 numbers.

Now this all works as expected in Notepad++, however sometimes these don't translate well across the various regular expression engines. As you haven't provided that info I can't give you an answer specific to your need.

Also I note you seem to want to "mask" the 3-8 digits. As it stands my 2nd group will just support replacing with a fixed number of "*", so some adjustment would be needed.

Hopefully this has helped you though to continue with a final solution.

Terry
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 

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.