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, ∼3057🔥, 0💬
Popular Posts:
Windows Vista Security basics - Understanding security and safe computing - Update Windows automatic...
How to download Mozilla FireFox 2? If you want to try Mozilla FireFox 2, you can follow this tutoria...
How to download and install JDK (Java SE Development Kit) 6? If you want to download and install JDK...
Can I remove startup application "OSA9.exe - Microsoft Office Launch Helper" to speedup my computer ...
What are default Startup Programs on a Windows 7 Home Premium computer? If you are running a Windows...