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, ∼3079🔥, 0💬
Popular Posts:
What is the scheduled task "\G2MUpdateTask-S-1-5-21 -..."on my Windows 7 computer? "\G2MUpdateTask-S...
What is "Lenovo Keyboard Noise Reduction" in my Windows 7 service list? And how is "Lenovo Keyboard ...
What is the startup program "fsquirt - fsquirt.exe" on my Windows 8 computer? Can I remove it to spe...
How to download and install HiJackThis? If you want to download and install HiJackThis to your Windo...
What is the "World Wide Web Publishing Service (W3SVC)" system service on Windows Server 2012? Can I...