logoalt Hacker News

wwind123today at 6:44 AM1 replyview on HN

To do regex matching efficiently, you need to compile the pattern before using it. That'd exclude dynamically "calling" other regex patterns. But bigger regex pattern strings can be composed from smaller regex pattern strings. You'd just need to do the composition before the compilation.


Replies

ystlumtoday at 8:00 AM

Also define blocks if all someone wants is to break the pattern up to make it more readable.