Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

I need help please... someone do a favor

Nov
27
1
How to find % character within a string (either single or multi line) contained in a variable?
 
The percent sign is very difficult to work with, since it's used for variable expansion. SETDOS /X-4 might be helpful. Or -- more complicated, but probably more reliable -- dump the variable to a file with e.g. SET MYVAR > MYVAR.TXT and then parse the file with FIND or FFIND or sed/awk/grep or whatever.

What do you mean by "find"? Find the offset of the first percent sign in the string? The last one? Count percent signs? Or just determine whether or not the string contains a percent sign?
 
Back
Top