For everyone that doesn't see the point, take a look at the example of parsing a long string [0]. The verbal expression is _much_ easier to read than the regular expression.
[0] https://github.com/VerbalExpressions/JavaVerbalExpressions/w...
[0] https://github.com/VerbalExpressions/JavaVerbalExpressions/w...
String pattern = (
"(\d+)\t"+
"(\d+)\t"+
"([0-1])\t"+
"(http://localhost:20\d{3})\t"+
"([0-1])\t"+
"(\d+)\t"+
"([0-1])\t"+
"(\d+)\t"+
"(\d+)\t"+
"([0-1])\t"+
"(\d+)\t"+
"(STR[0-2])"
);
And this is just as easy to read as their second example: String num = "(\d+)\t";
String bool = "([0-1])\t";
String url = "(http://localhost:20\d{3})\t";
String str = "(STR[0-2])";
String pattern = num+num+bool+url+bool+num+bool+num+num+bool+num+str;
And yes, I do frequently split up my regexes like that to make them more readable.The only improvement I see is that you don't have messy escaping in the url. That is genuinely nice. It motivates me to start using an regEsc() function instead of doing it by hand. However, I find "capt().endCapture()", and other verboseness to be a step backwards.
Edit: Actually, from what I can tell, all the escaping was unnecessary in this case as well. Updated examples without unneeded escape characters.