Character substitution in %variable

R

Rich Pasco

Someone must have thought of an easy way to do this:

I would like to replace every underscore with a blank in %variable
in a command-shell script (BAT file).

For example, if %%A is
"The_quick_brown_fox_jumps_over_the_lazy_dog"
then I would like to quickly generate
"The quick brown fox jumps over the lazy dog"

I can think of several ways, but they're all pretty long and kludgy.
Can anybody think of an elegant solution?

- Rich
 
R

Rich Pasco

Rich said:
Someone must have thought of an easy way to do this:

I would like to replace every underscore with a blank in %variable
in a command-shell script (BAT file).

For example, if %%A is
"The_quick_brown_fox_jumps_over_the_lazy_dog"
then I would like to quickly generate
"The quick brown fox jumps over the lazy dog"

I can think of several ways, but they're all pretty long and kludgy.
Can anybody think of an elegant solution?

- Rich

Here's one of those long, kudgy ways:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top