2 ms·
Exactly. I would never write a long run on regex like parent. I'd break it down like this so I could read it when I came back to it later. Nice job.
by labrador 4y ago
Exactly. I would never write a long run on regex like parent. I'd break it down like this so I could read it when I came back to it later. Nice job.
- egberts1 4y agoSome regex engines cannot handle separate parsing (due to need of a state machine to track next continued line) broken down due to [prior] end-of-line notation. and most regex engines cannot handling labels of assignments for later reuse within its expression. It is however still useful to leverage a higher language to do the constructing of a final regex pattern from repeated patterns (basic building block) prior to engine usages.
- labrador 4y agoI get around it by using specifiers in strings and using string substitution before passing off to the Regex