Click here to Skip to main content
15,881,898 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
AnswerRe: Need a bit of help concerning RegEx Pin
OriginalGriff12-Dec-22 23:47
mveOriginalGriff12-Dec-22 23:47 
QuestionWhy does this work but this doesn't Pin
Andrew St. Hilaire26-Nov-22 16:52
Andrew St. Hilaire26-Nov-22 16:52 
QuestionRe: Why does this work but this doesn't Pin
k505426-Nov-22 17:30
mvek505426-Nov-22 17:30 
AnswerRe: Why does this work but this doesn't Pin
Andrew St. Hilaire26-Nov-22 17:51
Andrew St. Hilaire26-Nov-22 17:51 
AnswerRe: Why does this work but this doesn't Pin
Richard Deeming27-Nov-22 22:11
mveRichard Deeming27-Nov-22 22:11 
AnswerRe: Why does this work but this doesn't Pin
jschell28-Nov-22 10:42
jschell28-Nov-22 10:42 
QuestionHow to remove an & in the following expressions Pin
Victor Nijegorodov21-Nov-22 8:31
Victor Nijegorodov21-Nov-22 8:31 
AnswerRe: How to remove an & in the following expressions Pin
k505421-Nov-22 10:21
mvek505421-Nov-22 10:21 
Typically, one would use capture grops and replacement expressions. In your case you might do
(.*MyMethod(.*, )&(SomeClass()/s\1\2
If there are many SomeClasses that you would like to replace, you might be able to use
(.*MyMethod(.*, )&(\w*()/s\1\2
Be cautious! I Have not tested either of these, and any time you're experimenting with regular expression replacements, Bad Things can happen. Back up Early! Back up Often!

This all assumes that you actually want to make replacements using Visual Studio, more information for which can be found here:
Keep Calm and Carry On

GeneralRe: How to remove an & in the following expressions Pin
Victor Nijegorodov22-Nov-22 3:32
Victor Nijegorodov22-Nov-22 3:32 
AnswerRe: How to remove an & in the following expressions Pin
Richard MacCutchan21-Nov-22 21:50
mveRichard MacCutchan21-Nov-22 21:50 
GeneralRe: How to remove an & in the following expressions Pin
Victor Nijegorodov22-Nov-22 2:41
Victor Nijegorodov22-Nov-22 2:41 
GeneralRe: How to remove an & in the following expressions Pin
Richard MacCutchan22-Nov-22 3:13
mveRichard MacCutchan22-Nov-22 3:13 
GeneralRe: How to remove an & in the following expressions Pin
Victor Nijegorodov22-Nov-22 3:59
Victor Nijegorodov22-Nov-22 3:59 
AnswerRe: How to remove an & in the following expressions Pin
Victor Nijegorodov22-Nov-22 4:05
Victor Nijegorodov22-Nov-22 4:05 
QuestionRegex search to find and remove consecutive lines which end with same characters Pin
Member 1582987913-Nov-22 5:05
Member 1582987913-Nov-22 5:05 
AnswerRe: Regex search to find and remove consecutive lines which end with same characters Pin
jschell14-Nov-22 6:43
jschell14-Nov-22 6:43 
QuestionRemoving + - chars if lines are starting with them only Pin
montaigne gremo2-Nov-22 2:32
montaigne gremo2-Nov-22 2:32 
AnswerRe: Removing + - chars if lines are starting with them only Pin
jschell14-Nov-22 6:39
jschell14-Nov-22 6:39 
QuestionFind the 4th last object in this campaign Pin
Michael Oct202220-Oct-22 3:05
Michael Oct202220-Oct-22 3:05 
AnswerRe: Find the 4th last object in this campaign Pin
Richard Deeming20-Oct-22 4:28
mveRichard Deeming20-Oct-22 4:28 
GeneralRe: Find the 4th last object in this campaign Pin
Michael Oct202220-Oct-22 5:04
Michael Oct202220-Oct-22 5:04 
QuestionSplitting with optionally second line Pin
G-Team2329-Sep-22 2:47
G-Team2329-Sep-22 2:47 
AnswerRe: Splitting with optionally second line Pin
Richard Deeming29-Sep-22 3:11
mveRichard Deeming29-Sep-22 3:11 
GeneralRe: Splitting with optionally second line Pin
G-Team2330-Sep-22 0:19
G-Team2330-Sep-22 0:19 
QuestionIs there a way to come up with a regular expression for this? Pin
fame_crane23-Sep-22 4:28
fame_crane23-Sep-22 4:28 

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.