m4-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Expanding a macro within a string?


From: R.K. Owen
Subject: Re: Expanding a macro within a string?
Date: Thu, 3 Sep 2009 07:50:01 -0700

You just need to break XXX from the surrounding text by putting
delimiters between the macro and the rest of the string with:
     some`'XXX`'thing      -> someZZZthing

On Thu, Sep 3, 2009 at 7:36 AM, Paul Kirkaas<address@hidden> wrote:
> Sorry, this seems like it must be covered in the docs, but I spent a few
> hours off & on searching, without luck.
>
> I want to do something like:
>
> define(XXX,ZZZ)
>
> then expand XXX within a string:
>
> someXXXstring => someZZZstring
>
> Obviously, XXX would require some kind of delimiter:
>
> some[XXX]string => someZZZstring.
>
> I managed to do half of what I want;
>
> defn(`XXX')string => ZZZstring
>
> Is there any way to get the full monty?
>
> Thanks,
>
> Paul
>
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]