Seems a pity to throw out the various advantages of the high-level solution just because your regex engine doesn't support a scalable syntax.
Advanced regex systems such as the Ragel parser-generator support a composition-friendly syntax, [0] but the average regex system doesn't, and I guess there's no quick fix for that.
Advanced regex systems such as the Ragel parser-generator support a composition-friendly syntax, [0] but the average regex system doesn't, and I guess there's no quick fix for that.
[0] http://thingsaaronmade.com/blog/a-simple-intro-to-writing-a-...