Collections:
Other Resources:
String Variable Match and Replace
How to perform sub-string match and replacement in a string batch variable?
✍: FYIcenter.com
You can perform a sub-string match and replacement in a string batch variable using the following variable modifier:
%variable:pattern=str%
Wildcard character "*" can be used in "pattern" to match any number of any characters.
Examples of string match and replacement modifiers:
rem Remove all double quotes from a string set variable=%variable:"=% rem Replace all "bar" to "foo" set variable=%variable:bar=foo% rem Remove the drive letter from a path name set java_home=%java_home:*:\=\%
⇒ Get Sub-String from Variable
⇐ What Are Batch Built-in Variables
2021-10-10, 1514🔥, 0💬
Popular Posts:
What is "Health Key and Certificate Management" in my Windows XP service list? And how is "Health Ke...
What is "Remote Desktop Services UserMode Port Redirector" in my Windows XP service list? And how is...
How can I tell the number of CPU or logical processors on my Windows Server 2016? To find out how ma...
How to use .htaccess file with Apache server on Window systems? Assuming that you have installed the...
How do I improve the touch sensitivity on my PC 1. Adjust the pen and touch settings in the Control ...