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

Regular Expressions

 
GeneralRe: regex expression for us addresses Pin
PIEBALDconsult21-Feb-23 15:02
mvePIEBALDconsult21-Feb-23 15:02 
GeneralRe: regex expression for us addresses Pin
jpcodex15321-Feb-23 15:25
jpcodex15321-Feb-23 15:25 
GeneralRe: regex expression for us addresses Pin
PIEBALDconsult21-Feb-23 15:30
mvePIEBALDconsult21-Feb-23 15:30 
GeneralRe: regex expression for us addresses Pin
Kenneth Haugland21-Feb-23 18:36
mvaKenneth Haugland21-Feb-23 18:36 
AnswerRe: regex expression for us addresses Pin
jschell22-Feb-23 6:06
jschell22-Feb-23 6:06 
GeneralRe: regex expression for us addresses Pin
trønderen22-Feb-23 12:04
trønderen22-Feb-23 12:04 
GeneralRe: regex expression for us addresses Pin
jschell23-Feb-23 6:09
jschell23-Feb-23 6:09 
GeneralWell no that isn't how it works Pin
jschell13-Feb-23 4:42
jschell13-Feb-23 4:42 
Rant about regex taken from the Code Project newsletter links. Figured I might as well put a response here.

Regular Expressions make me feel like a powerful wizard – and that’s not a good thing – Terence Eden’s Blog[^]

"The other day I had to fix a multi-line Regular Expression (RegEx). After a few hours of peering at it with a variety of tools,"


But the author doesn't suggest that there was in fact a different way to approach the problem.

"There's no space for comments"


Well no that isn't true.

For starters Perl language actually allows embedded comments although I would not use them.
However I can certainly explain the regex, and often do, outside of the regex itself.
Of course some few complain that code, all code, should not have comments at all but that is a personal problem.

"Here are some positive use-cases for RegEx":


Obviously just sarcasm but missing the point that there is a range of problems where regexes should be used. The solution to not using them would be to write the code that the regex represents in the first place. Which would be much more verbose and more likely the source of errors.

There are actually however cases of misuse that are not named where someone thinks they can avoid other types of solutions by incorrectly applying regexes. That is often the case for XML/HTML parsing.

"We should be writing intelligible code for each other"


Agreed. But there are always trade offs. I can't write code that a junior developer is going to easily understand and still produce code at the rate at which I do. Doesn't mean that I should write code that a mid level or even senior level developer is going to have to spend days figuring out. And I do try to make it easier for them to understand (often by adding comments to explain odd constraints and/or external factors.)
QuestionProblem combining REGEX expressions Pin
Member 156868422-Jan-23 18:40
Member 156868422-Jan-23 18:40 
AnswerRe: Problem combining REGEX expressions Pin
Member 156868423-Jan-23 3:25
Member 156868423-Jan-23 3:25 
GeneralRe: Problem combining REGEX expressions Pin
jschell24-Jan-23 10:38
jschell24-Jan-23 10:38 
Questioni need a regular expression to match a single word starting with m(...followed by any text but not space and )containing Manager Pin
anandssunku8-Jan-23 23:10
anandssunku8-Jan-23 23:10 
AnswerRe: i need a regular expression to match a single word starting with m(...followed by any text but not space and )containing Manager Pin
Richard Deeming9-Jan-23 0:07
mveRichard Deeming9-Jan-23 0:07 
AnswerRe: i need a regular expression to match a single word starting with m(...followed by any text but not space and )containing Manager Pin
jschell10-Jan-23 7:24
jschell10-Jan-23 7:24 
QuestionSometimes its a bullet item, sometimes it is not, sometimes it is multiple bullet items Pin
Member 158838933-Jan-23 22:31
Member 158838933-Jan-23 22:31 
AnswerRe: Sometimes its a bullet item, sometimes it is not, sometimes it is multiple bullet items Pin
OriginalGriff3-Jan-23 22:37
mveOriginalGriff3-Jan-23 22:37 
GeneralRe: Sometimes its a bullet item, sometimes it is not, sometimes it is multiple bullet items Pin
Member 158838933-Jan-23 23:14
Member 158838933-Jan-23 23:14 
QuestionRegEx- Find files in Linux which match the expression Pin
JDMils3-Jan-23 16:16
JDMils3-Jan-23 16:16 
AnswerRe: RegEx- Find files in Linux which match the expression Pin
Richard MacCutchan3-Jan-23 21:32
mveRichard MacCutchan3-Jan-23 21:32 
AnswerRe: RegEx- Find files in Linux which match the expression Pin
k50544-Jan-23 9:12
mvek50544-Jan-23 9:12 
GeneralRe: RegEx- Find files in Linux which match the expression Pin
JDMils8-Jan-23 12:56
JDMils8-Jan-23 12:56 
QuestionRegular Expression to find parts of a <script/img src=""> or <link href=""> attribute value Pin
Steve M Penner3-Jan-23 5:13
Steve M Penner3-Jan-23 5:13 
QuestionParsing Session Campaign Data in Data Studio Pin
Michael Oct20223-Jan-23 3:16
Michael Oct20223-Jan-23 3:16 
AnswerRe: Parsing Session Campaign Data in Data Studio Pin
Michael Oct20223-Jan-23 5:01
Michael Oct20223-Jan-23 5:01 
QuestionNeed a bit of help concerning RegEx Pin
Regis Maltais 202112-Dec-22 23:42
Regis Maltais 202112-Dec-22 23:42 

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.