In regards to the below question, I want to understand why it was closed as "too broad".
As far as regex questions go, this is the most focused, verifiable, and clear question I have ever seen. No room for interpretation. If there is any room for interpretation, or providing any other answer that is more than a stylistic change, what is it?
Technically, it had issues before it was edited (just less clear, it said the exact same thing the whole time); But it was closed almost 2 hours after the final edit, which means that the question, in its current form, was deemed 'too broad', by multiple people.
Also, if this really isn't too broad, I doubt anyone would flag it if it came up in audit, so should it be reopened or left as is? (Does the audit system have anything to protect itself from bad audit questions?) I can't vote to open, so does that mean I should flag it for moderator review?
Here is a copy of the question.
So I have a regex pattern that works well. I wanted to see if I could make it better.
Here it is:
"(SEGMENTA)(.*?)(SEGMENTB)(SEGMENTB)(SEGMENTB)"
So this looks for any pattern with (SEGMENTA) (anything) (SEGMENTB)(SEGMENTB)(SEGMENTB).
But is there also a way to say that I want it to bring back if it only has this"
"(SEGMENTA)(.*?)(SEGMENTB)"
Essentially the last 2 ending SegmentB can be optional.