it should(could) have newlines for readability. and is genererally an underappreciated feature that leads to people thinking that regex is crazy and unreadable.
I didn’t know about this so I tried testing it out. Yes, this is possible, but requires enabling a specific flag (x when it comes to regexp2) assuming the engine even supports this feature.
also comments. which can be very simple…like metadata about boundary,membership,grouping, or hierarchy.
its supported in most languages except javascript and plain grep.
but it doesnt serve a programmatic use… so even if its a hella useful single char or digit, that massively boosts readability… some people would argue that it’s extra/junk
it should(could) have newlines for readability. and is genererally an underappreciated feature that leads to people thinking that regex is crazy and unreadable.
I didn’t know about this so I tried testing it out. Yes, this is possible, but requires enabling a specific flag (x when it comes to regexp2) assuming the engine even supports this feature.
also comments. which can be very simple…like metadata about boundary,membership,grouping, or hierarchy.
its supported in most languages except javascript and plain grep.
but it doesnt serve a programmatic use… so even if its a hella useful single char or digit, that massively boosts readability… some people would argue that it’s extra/junk