regex format string extension for more than nine captures
I need to be able to reformat match_results that contain more than nine captures using format strings. I'm looking for advice as to the easiest way to accomplish this. Is there some existing work I can build on or borrow from? I need syntax similar to the boost extended syntax, possibly using two digits for the capture number, e.g., '$01' It's important to me to be able to use the extended syntax's conditional expression '?Ntrue-expression:false-expression', again probably with two digits 'NN' in place of the single 'N'. Any help would be greatly appreciated. -eb-
I need to be able to reformat match_results that contain more than nine captures using format strings. I'm looking for advice as to the easiest way to accomplish this. Is there some existing work I can build on or borrow from?
I need syntax similar to the boost extended syntax, possibly using two digits for the capture number, e.g., '$01' It's important to me to be able to use the extended syntax's conditional expression '?Ntrue-expression:false-expression', again probably with two digits 'NN' in place of the single 'N'.
Actually $NN will replace the NN'th sub-expression and ?NNfoo:bar will output either foo or bar depending upon whether expression NN was matched or not. So two digit references to sub-expressions *are* supported right now. HTH, John.
participants (2)
-
Evan Burkitt
-
John Maddock