Adware Spyware (7)
DOS Commands (1)
Internet Explorer (217)
Media Center (12)
Media Player (11)
Mozilla Firefox (18)
Windows 10 (166)
Windows 7 (636)
Windows 8 (1091)
Windows Phone (33)
Windows Server 2008 (165)
Windows Server 2012 (84)
Windows Server 2016 (23)
Windows Vista (52)
String Variable Match and Replace
How to perform sub-string match and replacement in a string batch variable?
You can perform a sub-string match and replacement in a string batch variable using the following variable modifier:
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
⇑ Working with Parameters and Variables
2021-10-10, 1227👍, 0💬
How to use .htaccess file with Apache server on Window systems? Assuming that you have installed the...
What is the HP computer registration process? If you bought a new HP computer and doing the initial ...
Can I disable Windows service "usnsvc.exe: Messenger Sharing USN Journal Reader Service" to speedup ...
How to remove DVDLauncher.exe from the startup application list to gain performance and reduce secur...
How to remove msjava.dll - Java Console Extra Tools Menu Item for Internet Explorer (IE) browsers? m...