I
ivo welch
I know regex can't do this, so may I ask what the recommended
procedure is for extracting a bracketed TeX argument, which itself can
contain other bracketed TeX arguments?
$string = " text \sometexmacro{arg1}{this is a second {\bf arg}
argument} more text";
and file.pm has a sub that makes it easy to describe all the arguments
to sometexmacro
\sometexmacro
arg1: 'arg1'
arg2: 'this is a second {\bf arg} argument'
if it were even smarter, it could also handle TeX comments and
escapes, such as
file.tex: \sometexmacro{arg1}{this is a second %}
{\bf arg} argument, which handles \} correctly }
Life would be heaven if regex's could do this, because I could then
automatically replace the second argument with what I want it to be.
Alas, they cannot. will they be able to do this in perl6?
procedure is for extracting a bracketed TeX argument, which itself can
contain other bracketed TeX arguments?
$string = " text \sometexmacro{arg1}{this is a second {\bf arg}
argument} more text";
and file.pm has a sub that makes it easy to describe all the arguments
to sometexmacro
\sometexmacro
arg1: 'arg1'
arg2: 'this is a second {\bf arg} argument'
if it were even smarter, it could also handle TeX comments and
escapes, such as
file.tex: \sometexmacro{arg1}{this is a second %}
{\bf arg} argument, which handles \} correctly }
Life would be heaven if regex's could do this, because I could then
automatically replace the second argument with what I want it to be.
Alas, they cannot. will they be able to do this in perl6?